Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can we optimize a sql query?

982


Are subqueries faster than joins?

948


Show code of a cursor for loop.

999


How to find 3rd highest salary of an employee from the employee table in sql?

1034


Does google use sql?

912


What are the constraints available in sql?

994


Why function is used in sql?

877


What are all the different normalization?

976


what are the disadvantages of mysql? : Sql dba

1074


What is input buffer in sql*plus?

1122


What are the types pl/sql code blocks?

1066


Can a commit statement be executed as part of a trigger?

995


what is meant by urlencode and urldocode? : Sql dba

1089


Is left join same as inner join?

1019


Can we rename a column in the output of sql query?

948