Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: VARCHAR2(1) vs CHAR(1)
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 - 01:22:47 CDT