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
Obtaining a natural join by specifying the common columns Synatax: SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON USING ( StudentId ) However, a named columns join doe

Quantification in SQL To quantify something, as the theory book has it, is to state its quantity, to say how many of it there are. For example, in Tutorial D the expression CO

Number Types The Number types permit you to store the numeric data (real numbers, integers, and floating-point numbers), show quantities, and do computations. BINARY_INTEG

Using the BULK COLLECT Clause The keywords BULK COLLECT specify the SQL engine to bulk-bind output collections before returning them to the PL/SQL engine. You can use these ke

Need Windows and Linux system Administrator We are seeking a part time system administrator to take care of our servers. Your things to do would add, but not limited to: -

Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI

Using LIMIT For nested tables, that have no maximum size, the LIMIT returns NULL. For varrays, the LIMIT returns the maximum number of elements that a varray can have (that yo

How Transactions Guard Your Database The transaction is a sequence of SQL data manipulation statements which does a logical unit of work. The Oracle treats the sequence of SQL

MAX and MIN operator in SQL Example: (SELECT MAX (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') (SELECT MIN (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') Example

Boolean Values Only the values TRUE, FALSE, & NULL can be assigned to a Boolean variable. For illustration, given the declaration DECLARE done BOOLEAN; the following statements