-
Package vs Standalone Procedures
What's the benefit of creating functions and procedures inside of a package instead of creating standalone functions and procedures? Any performance benefit?
Thank you.
-
I am not sure about any performance gain by putting procedure/function together into package. It is entirely depend on your application requirement, database design and your application logic for example if you are developing CRM or ERP module and one procedure is calling other procedure or function or you have too many procedure is depend on each other than as a developer I would like to put some amount of set of procedure or function together into one meaningful package for particular task that makes developers life easier to maintain and debug the application code.
Circumstances do not rise to meet our expectation. Embrace what you actually get. Open your eyes. See things for what they really are Thereby sparing yourself the pain of false attachements.
-
Yes, profit of performace and memory.
Possibility to use global variable.
Márcio de Souza Almeida
DBA Oracle / SQLServer / PostgreSQL
Rua Cupa, 139 Apto 85 A
Penha - São Paulo - SP
03640-000 - Brasil
http://www.directory.com.br
-
Where I work we try to take common business functions/logic and encapsulate them into a packages. We have a package for logging error messages. We have another package that stores all of the reports.
The advantage is that each procedure/function in a package that uses common code with another procedure/function in the same package can call the same procedure/function. We also use global variable as constants. I.E. for things that aren't supposed to change, but might change. Which makes the code more readable and flexible. It also means we don't always have to pull the information from a table.
Code that is completely unrelated to any other code could be a stand alone procedure/function. However, I like the idea of compartmentalizing code into packages. I find it easier to maintain. But to each their own.
-
Read this, and then use packages
-
Originally posted by slimdave
Read this, and then use packages
Damn, I was just looking for that... You beat me to the punch...
Jeff Hunter
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|