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

Home -> Community -> Usenet -> c.d.o.server -> Re: char vs. varchar?

Re: char vs. varchar?

From: David Fitzjarrell <oratune_at_aol.com>
Date: Mon, 05 Feb 2001 04:43:58 GMT
Message-ID: <95lb2d$vhu$1@nnrp1.deja.com>

In article <3A7C1F56.C8009BD_at_0800-einwahl.de>,   Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de> wrote:
> Which overhead is implied in using VARCHAR2 (1) as compared to CHAR
 (1)?
>
> I claim there is no such overhead. Both are stored as variable length
 data. You
> can see that by examining with vsize and dump.
>
> Martin
>
>

A much more reliable method of ascertaining such information is to actually perform a block dump rather than utilise vsize and dump. These functions will report on the length of the actual data in the column but they will not report any row overhead that may be present. Having conducted a test by creating two like tables, differing only in the use of CHAR and VARCHAR2 datatypes, inserting the exact same data into both tables and actually dumping the datablocks to examine the storage I have found, as listed in a response to Connor's post, that there is, indeed, no additional storage reported for VARCHAR2 fields over CHAR fields. As I also stated in that post I stand corrected.

If one is to argue against another's post, it is best to do so with all of the information at hand, not simply a portion of it.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com
http://www.deja.com/
Received on Sun Feb 04 2001 - 22:43:58 CST

Original text of this message

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