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 varchar2

Re: char vs varchar2

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Sun, 3 Nov 2002 23:41:23 +1000
Message-ID: <cD8x9.68491$g9.193864@newsfeeds.bigpond.com>

"Murty Adavi" <adavi_at_attbi.com> wrote in message news:FoUw9.224547$%d2.75129_at_sccrnsc01...
> Version : Oracle 8i
> I have table a with an in index on a 'char' field. Will there be any
> difference in index performace
> based on whether a column is char as opposed to varchar2 ?
> I know that the 'comparison semantics' differ for char & varchar2 but
I
> would like to know the
> difference between char & varchar2 from performance stand point.
>
> Thanks

Hi Murty,

There could be performance issues with chars vs varchar2s *if* the column lengths are somewhat variable and char wastes a lot of storage padding out spaces.

Because this would mean storing fewer index entries per block meaning more leaf blocks are required to store the data. This would result in having to potentially navigate more leaf blocks during index range scans, during full index scans, etc.

In an extreme case, these additional leaf pages could result in a higher index structure (although all things being equal, somewhat unlikely).

Cheers

Richard Received on Sun Nov 03 2002 - 07:41:23 CST

Original text of this message

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