Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Riddle me this Oracle riddle...

RE: Riddle me this Oracle riddle...

From: Gilles PARC <gparc_at_online.fr>
Date: Wed, 06 Mar 2002 13:46:48 -0800
Message-ID: <F001.004214FD.20020306134648@fatcity.com>

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-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed Mar 06 2002 - 15:46:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US