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 -> Re: Indexing a compound PK, 2 x VARCHAR(24)??

Re: Indexing a compound PK, 2 x VARCHAR(24)??

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 23 Nov 1999 07:09:51 -0500
Message-ID: <ut0l3sc9e11so7ngjavpj73b8to88ik25m@4ax.com>


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 - 06:09:51 CST

Original text of this message

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