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: VARCHAR2(1) vs CHAR(1)

Re: VARCHAR2(1) vs CHAR(1)

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Tue, 30 Jul 2002 13:08:01 GMT
Message-ID: <Rcw19.91030$uh7.14556@sccrnsc03>


Why don't you try it. Set up a test and bench mark it. Jim
"Marco Muracchioli" <reply.on_at_group.please> wrote in message news:Xgq19.156062$vm5.5258194_at_news2.tin.it...
> Hi Richard,
>
> this may be correct, but now I ask:
> it a char column is always filled up to it's length, why Oracle don't read
DD
> and then always use the field length value for a fast reading?
> If u have to read just one record may be slower, but in data warehouse
> application, for example, where u read many million rows each time should
be
> faster.
>
> Few months ago, we ask to italian Oracle support the same question that
> Stjepan, or "if we use 1 or 2 char length field, wich datatype is the
better
> choice for speed?"
> Oracle support answer the same way I do: use char, because it don't need
> length before data.
>
> I really don't know what think about. :)
> Maybe this morning I'll get one of my datafile and an hex editor... :)
>
> Marco
>
> "Richard Foote" <richard.foote_at_bigpond.com> ha scritto nel messaggio
> news:Gvk19.47019$Hj3.142967_at_newsfeeds.bigpond.com...
> > Hi Marco,
> >
> > If you take a squiz at the Concepts Manual, the chapter that discusses
> > Schema objects has a discussion of the format of a row,
> >
> > Young Conner (so he tells me) is absolutely correct in saying that
Oracle
> > stores Char and Varchar2 in the same way (column length followed by
column
> > value). The reason being that as Oracle ploughs through a row taking out
> > data of interest, it requires the length portion of the column to
determine
> > how much to read (else it would require access to the DD to determine
it's
> > length, I don't think so).
> >
> > Cheers
> >
> > Richard
>
>
Received on Tue Jul 30 2002 - 08:08:01 CDT

Original text of this message

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