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: sequence as primary key

Re: sequence as primary key

From: Jason Salter <jason_at_seahorseNOSPAM.demon.co.uk>
Date: Mon, 11 Oct 1999 16:28:00 +0100
Message-ID: <sgECOOysz4rguXnLpiBPgzzdpIhx@4ax.com>


On Mon, 11 Oct 1999 15:00:56 +0100, "Neil C" <btsscrth_at_bt.com> wrote:

>Using sequence numbers can affect the balance (right handness) of your
>indexes, although this has been helped in Oracle 8 with the introduction of
>reverse key indexes.
>
>Deciding whether to use 2 or more columns depends on whether this helps with
>the cardinality of the index and / or whether it will help in resolving
>queries solely from the index (i.e without having to go to the table).
>Naturally, the size of the index will be slightly larger in order to store
>the values, and it may make it more likely that the index will be updated
>(and therefore deleted from the leaf blocks) by changes to one of the
>columns.
>

And you'll get gaps in the sequencing (i dunno if this would be a problem for you or not) when transactions rolled back or when the instance crashed.

>HTH
>
>NeilC
>
>Michael Mehling wrote in message <7tsojb$97i$1_at_news.pop-stuttgart.de>...
>>sequence number as primary key vs. logical primary key
>>
>>What are the pro's and con's of using a unique sequence number as primary
>>key (like Oracle recommands)?
>>What are the pro's and con's of using a primary key using 2 or more
>>data-columns of a table
>>
>>M. Mehling
>>
>>
>
Received on Mon Oct 11 1999 - 10:28:00 CDT

Original text of this message

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