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
Data Types in SQL - Timestamp TIMESTAMP for values representing points in time on a specified uniform scale. DATE is used for timestamps on a scale of one day, such as DATE '2

Keyword and Parameter Description: label_name: This is an undeclared identifier which optionally labels the PL/SQL block. When used, label_name should be enclosed by the do

Iterative Control: LOOP  Statements The LOOP statement executes a series of statements multiple times. There are 3 forms of LOOP statements: LOOP, WHILE-LOOP, & FOR-LOOP. LOOP

Expression: This is a randomly complex combination of constants, variables, literals, operators, & function calls. The simplest expression consists of a single variable. If th

Transactions in SQL BEGIN TRANSACTION, COMMIT, and ROLLBACK, SQL has the same syntax except for START in place of BEGIN. However, START TRANSACTION is used only for outermost

Recursion The Recursion is a powerful method for simplify the design of the algorithms. Principally, the recursion means the self-reference. In the recursive mathematical serie

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

Declaring Exceptions The Exceptions can be declared only in the declarative part of the PL/SQL subprogram, block, or package. By introducing its name, you can declare an excep

Project Description: I want somebody who can help me with an idea that I have been working on for a few months now. The person will require extensive knowledge of warcraft 3 PvP

LOOP Statements The LOOP statements execute a series of statements at multiple times. The loops enclose the series of statements that is to be repeated. The PL/SQL provides typ