Which is better to use, procedures or packages? If a procedure within a package is called, will it load the entire package into memory? What is the best way to handle it?

Showing Answers 1 - 15 of 15 Answers

Pallavi

  • Sep 24th, 2007
 

When a procedure within a package is called the entire package is loaded into the memory.

  Was this answer useful?  Yes

It depends on the requirement, If the procedures are dependant on each other  then it is better to go for a package , So that whenever a procedure is executed that time it will load the total package and it will execute accordingly it won't interact everytime with the database to get the procedure.If one procedure in the package is called it will load total package in to the memory.

  Was this answer useful?  Yes

If the procedure doing one part of your procedure then you can always use that procedure into the packages, and if you want to do the singal opration you can use procedure only.

If you call procedure  from package, package get load into the memory. We can use pragma to overcome from same. 

  Was this answer useful?  Yes

vinay

  • Aug 11th, 2011
 

use interfaces

  Was this answer useful?  Yes

Abhirup Roy

  • Oct 27th, 2015
 

Hi.. Good question. Both the usage of standalone procedure or a packaged procedure have their own advantages and disadvantages. We generally create packaged procedure only when the other members of package are also going to be used in calculation in the current session as calling any package object will load the entire package specification and definition into memory. Plus we do use packaged procedures for Overloading purpose as well. If these are not the targeted activity, then standalone procedure is better option as it will lead to efficient memory utilization.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions