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

What type of database is cloud sql?

1090


What is flag in sql?

1027


How can you save or place your msg in a table?

999


How many clustered indexes can be created on a table?

1072


Why truncate is used in sql?

995


What is the difference between delete, truncate and drop command?

1135


Why is there a need for sqlcode and sqlerrm variables?

1040


What is graph sql?

980


What is pl sql in dbms?

942


What does desc stand for?

1063


How do I run a query in pl sql developer?

984


What is the difference between clustered and non-clustered index in sql?

1005


Is sql better than access?

1007


How to display the records between two range in Oracle SQL Plus?

1138


What are the topics in pl sql?

967