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
What are data types in pl sql?
How do sql databases work?
define sql delete statement ? : Sql dba
What is server name sql?
Can pl sql procedure have a return statement?
What are sql objects?
Is sql easier than java?
What is difference between sql function and stored procedure?
Explain what is table in a database?
Explain the working of foreign key?
Can we use two order by clause in query?
What are all the different normalization?
What does select count (*) mean in sql?
What does bitemporal mean?
What are the types of subqueries?