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
How can you get sql*loader to commit only at the end of the load file? : aql loader
what is the difference between sql and t-sql? : Transact sql
What are pl/sql cursor exceptions?
tell us something about heap tables. : Sql dba
Does inner join return duplicate rows?
What is difference sql and mysql?
What is difference between table and view?
What are crud methods?
What is %type in sql?
How do I add a primary key to a table?
what is primary key? : Sql dba
What are triggers and its uses?
What is snowflake sql?
What is sql constant?
What is %type in pl sql?