Use the nocopy compiler hint - performance of application, PL-SQL Programming

Use the NOCOPY Compiler Hint

By default, the OUT and IN OUT parameters are passed by the value i.e. the value of an IN OUT actual parameter is copied into the corresponding formal parameter. Then, if the subprogram exits generally, the values assigned to OUT and IN OUT formal parameters are copied into the corresponding actual parameters.

If the parameters hold large data structures like records, collections, and instances of object types, all this copying slows down the execution and uses up memory. To secure that, you can specify the NOCOPY hint, that allows the PL/SQL compiler to pass OUT and IN OUT parameters by reference. In the illustration below, you ask the compiler to pass IN OUT parameter my_unit by reference rather by value:

DECLARE

TYPE Platoon IS VARRAY(200) OF Soldier;

PROCEDURE reorganize (my_unit IN OUT NOCOPY Platoon) IS ...

BEGIN

...

END;

Posted Date: 10/5/2012 4:58:15 AM | Location : United States







Related Discussions:- Use the nocopy compiler hint - performance of application, Assignment Help, Ask Question on Use the nocopy compiler hint - performance of application, Get Answer, Expert's Help, Use the nocopy compiler hint - performance of application Discussions

Write discussion on Use the nocopy compiler hint - performance of application
Your posts are moderated
Related Questions
EXECUTE IMMEDIATE Statement   The EXECUTE IMMEDIATE statement prepare (parses) and instantly executes a dynamic SQL statement or an anonymous PL/SQL block. Syntax:

How Calls Are Resolved? The figure shows that how the PL/SQL compiler resolves the subprogram calls. When the compiler encounters the procedure or function call, it tries to di

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

Need Database Development with Analysis Tools Project Description: I want a database for large governmental and private data sets on one country that can be simply extended t

SQL Database: So, an SQL database is one whose symbols are organized into a collection of tables. Now, shows an SQL table as the current value of an SQL variable, ENROLMENT, b

Nested Tables versus Index-by Tables The Index-by tables and nested tables are just similar. For e.g.  They have similar structure and their individual elements are accessed in

Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati

Using EXISTS The EXISTS(n) returns TRUE if the nth element in a collection exist. Or else, EXISTS(n) returns FALSE. Primarily, you use EXISTS with DELETE to maintain the spars

Semidifference via NOT IN and a subquery SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' AND StudentId NOT IN (SELECT StudentId FROM IS_ENROLLED_ON WHER

Effect of Anonymous Columns Now, recall that a VALUES expression denotes a table with undefined column names. If an initial value is to be specified when a base table is creat