PL/SQL allocates memory for the variable's at runtime or at
compile time
Answer Posted / gaurav
For a CHAR variable, PL/SQL allocates at compile time enough memory for the maximum size.
For a VARCHAR2 variable, memory allocation depends on maximum size:
If the maximum size is less than 4,000 bytes, PL/SQL allocates at compile time enough memory for the maximum size.
If the maximum size is 4,000 bytes or more, PL/SQL allocates at run time enough memory for the actual value.
Thus, PL/SQL optimizes smaller VARCHAR2 variables for performance and larger ones for efficient memory use. ( from oracle doc)
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
When you have to use a default "rollback to" savepoint of plvlog?
Write a query to display the current date in sql?
Can we join same table in sql?
What is the sql*loader? : aql loader
Is sql difficult?
How to find 3rd highest salary of an employee from the employee table in sql?
What is fmtonly in sql?
How do I debug a stored procedure?
What are the different types of triggers?
what are the advantages and disadvantages of views in a database? : Sql dba
What is a database trigger?
What is nested table in pl sql?
What are the disadvantages of not performing database normalization?
What is sql profiling in oracle?
What is scalar data type in pl sql?