PL/SQL allocates memory for the variable's at runtime or at
compile time
Answers were Sorted based on User's Feedback
Answer / 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 |
What is cursor in pl sql with examples?
How does a covering index work?
what are enums used for in mysql? : Sql dba
Is primary key is clustered index?
What is the use of primary key?
Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?
What is dbo in sql?
Why we use stored procedure instead of query?
Give the structure of the function ?
What is a primary key sql?
Does oracle use sql?
What is a unique key?