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 type of database is cloud sql?
What is flag in sql?
How can you save or place your msg in a table?
How many clustered indexes can be created on a table?
Why truncate is used in sql?
What is the difference between delete, truncate and drop command?
Why is there a need for sqlcode and sqlerrm variables?
What is graph sql?
What is pl sql in dbms?
What does desc stand for?
How do I run a query in pl sql developer?
What is the difference between clustered and non-clustered index in sql?
Is sql better than access?
How to display the records between two range in Oracle SQL Plus?
What are the topics in pl sql?