Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Riddle me this Oracle riddle...
Hi listers,
continuing on varchar2 memory cost in PL/SQL,
note this found in Oracle 8i/9i PL/SQL user guide :
(Chapter 3 PL/SQL Datatypes - Character types - Varchar2)
"Small VARCHAR2 variables are optimized for performance,
and larger ones are optimized for efficient memory use.
The cutoff point is 2000 bytes. For a VARCHAR2 that is 2000 bytes
or longer, PL/SQL dynamically allocates only enough memory
to hold the actual value. For a VARCHAR2 variable that is
shorter than 2000 bytes, PL/SQL preallocates the full declared length
of the variable. For example,
if you assign the same 500-byte value to a VARCHAR2(2000 BYTE)
variable and to a VARCHAR2(1999 BYTE) variable, the former
takes up 500 bytes and the latter takes up 1999 bytes. "
HTH Regards
Gilles Parc
carpe diem !!
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Gilles PARC INET: gparc_at_online.fr Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Wed Mar 06 2002 - 15:46:48 CST
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
![]() |
![]() |