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: Performance question

Re: Performance question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 29 May 2002 22:37:03 +0200
Message-ID: <ufafin8tr37ue0@corp.supernews.com>


The length is stored with the data, expect for date columns (fixed length of 7 bytes).
This used to be in Appendix A of the Oracle Server Administrators Manual. A search on 'datatypes' on http://tahiti.oracle.com will probably provide the correct reference.

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address

"Eric Levinson" <nospam_at_nospam.com> wrote in message
news:%h8J8.4759$3w2.21577_at_typhoon.sonic.net...

> Oops, I made a mistake, you were confirming my original quesiton, that
yes,
> the length of the column is stored with the data, can anyone else confirm
> this? Is this documented in any Oracle documentation? I can't find it
> anywhere.
>
> Thanks,
>
> Eric
>
> "Eric Levinson" <nospam_at_nospam.com> wrote in message
> news:ie8J8.4757$3w2.21689_at_typhoon.sonic.net...
> > Thanks for your answer, Howard, however it was not what I was asking.
> >
> > For CHAR(10), what you stated applies.
> > For VARCHAR(10), the column is variable size regardless of the "10"
> >
> > My question is, if I store the word 'test' in a VARCHAR2(10) column, is
> > there another piece of data ONLY for varchar2 or any other datatype
which
> is
> > variable width which would store the number 4, so that LENGTH returns
this
> > value, or is this data NOT stored, and everytime LENGTH function is
> called,
> > the database has to count characters in the VARCHAR2 field till it
reaches
> > some end of field mark (like hex FF)
> >
> >
> > Thanks,
> > Eric
> >
> >
> >
> > "Howard J. Rogers" <dba_at_hjrdba.com> wrote in message
> > news:ad14go$gkk$1_at_lust.ihug.co.nz...
> > > The format of a row is: row header, column length - value; column
> length -
> > > value; column length - value; and so ad infinitum (nearly).
> > >
> > > The length of a field is stored as an attribute within the row. If it
> was
> > > Name Char(10) it would be stored as :10:Smith-----: If it was Name
> > > varchar2(10) it would be stored as :5:Smith:
> > >
> > > Regards
> > > HJR
> > >
> > > "Eric Levinson" <nospam_at_nospam.com> wrote in message
> > > news:DjUI8.4416$3w2.19388_at_typhoon.sonic.net...
> > > > When a VARCHAR2 type column is defined, how does the LENGTH function
> get
> > > the
> > > > length of the varchar contained in the column? Does it count up the
> > > number
> > > > of bytes to some end of string marker, or is there an internally
held
> > and
> > > > maintained attribute of varchar which maintains the size?
> > > >
> > > > Reason why I am asking, there might be a performance hit to use
LENGTH
> > if
> > > it
> > > > has to calculate it every time.
> > > >
> > > > Any help would be appreciated
> > > >
> > > > oracle at levinsong dot com
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Received on Wed May 29 2002 - 15:37:03 CDT

Original text of this message

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