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
ORIGIN OF EARTH - BIG-BAN G HYPOTHESIS - Origin of life is linked to origin of earth. Cosmos, the Universe originated 10-20 billion years ago by Big Bang (thermonu

Selecting Objects: Suppose that you have run the SQL*Plus script below that creates object type Person and object table persons, and that you have settled the table: CREATE

Write a query to find academics that are authors and that have only ever coauthored papers with authors from institutes in the same state as their own. List their academic number,

write the program for traffic control system with 10 second, 15 secod, and 20 second delay

Parameter and Keyword Description:   table_reference: This keyword identifies the table or view that should be accessible when you execute the UPDATE statement, and for wh

Equivalences & Rewrite Rules: If notice that as well as allowing us to prove trivial theorems, and tautologies enable us to establish that certain sentences are saying the sam

Defining REF CURSOR Types To make cursor variables, you take 2 steps. At first, you define a REF CURSOR type, and then declare the cursor variables of that type. You can defin

EXIT Statement   You can use the EXIT statement to exit a loop. The EXIT statement has 2 forms: the conditional EXIT WHEN and the unconditional EXIT. With the either form, you

Opening a Cursor Variable The OPEN-FOR statement relates a cursor variable with the multi-row query, executes the query, and then identifies the result set. The syntax for ope

IN Mode An IN parameter pass the values to the subprogram being called. Within the subprogram, an IN parameter acts like a constant. And hence, it cannot be assigned a value.