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

Home -> Community -> Usenet -> c.d.o.misc -> Index Key size for varchar2 columns.

Index Key size for varchar2 columns.

From: David Pattinson <dpattinson_at_enternet.com.au>
Date: Wed, 24 Nov 1999 10:27:06 +1100
Message-ID: <383B22C9.633F9144@enternet.com.au>


Thanks Thomas,

I have one more small question. If the key columns are varchar2, will the index keys have size of the maximum possible string that could be stored? In other words, if I have four VARCHAR2(24) columns in my PK will the index keys be 96 bytes or will they vary in length depending on the actual strings stored.

Thanks again, David.

Thomas Kyte wrote:

> A copy of this was sent to David Pattinson <dpattinson_at_enternet.com.au>
> (if that email address didn't require changing)
> On Tue, 23 Nov 1999 10:43:05 +1100, you wrote:
>
> >How will Oracle build the index keys for a large compound PK? Does it
> >only use the first n characters, or does it use the entire PK?
> >
> >Thanks, David.
>
> It uses the entire primary key (else uniqueness would be hard to confirm)...
>
> In Oracle8i, release 8.1 and up, you can employ index key compression where by
> the leading edge of an index that repeats alot can be factored out to the block
> level, resulting in much smaller indexes.
>
> --
> See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June 21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Tue Nov 23 1999 - 17:27:06 CST

Original text of this message

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