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 the types of subquery? : Sql dba
Is sql procedural language?
What is difference between nchar and nvarchar?
How to pronounce postgresql?
What is your daily office routine?
How do you copy a table in sql?
what does it mean to have quoted_identifier on? : Sql dba
What has stored procedures in sql and how we can use it?
Can you join views in sql?
How do you drop a trigger?
What does joining a thread mean?
What are the advantages of sql? Explain
Explian rowid, rownum? What are the psoducolumns we have?
What is linq to sql?
what is self join and what is the requirement of self join? : Sql dba