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: What's the most efficient primary key ?

Re: What's the most efficient primary key ?

From: Joe Maloney <mpir_at_bellsouth.net>
Date: Sat, 21 Jul 2001 23:07:10 GMT
Message-ID: <d17bad25.0105251147.1ed75568@posting.google.com>

The first two questions are why and where.

That is, the most efficient key is not necessarily an identity value. How many foreign key relationships (parent/child) are there going to be? It may be more efficient to use a text string in some cases.

Not all applications need primary keys.
This is the why.

The most efficient key is probably going to be a hash value if it can be reconciled to a given page/cluster/disk address. But that may take petabytes of storage if you have billions of keys.

This is the where.

The whole thing hinges more on your application needs and platform than an academic foot stomping.

Obnoxio The Clown <obnoxio_at_hotmail.com> wrote in message news:<990804492.81920982_at_news.cis.dfn.de>...
> On Fri, 25 May 2001, worldonline wrote:
> >I want to create billions of unique key, wat's the best option?
> >
> >a compound key containing several integer-columns,
> >a large datatype (decimal)
> >or a string perhaps ??
> >
> >i would like the first options, it is good for using OID's
>
> Um. Any particular reason this was cross posted across the entire known
> universe?
>
> I you were using Informix IDS 9.2, you could use a SERIAL8, which is an 8-byte,
> autoincrementing integer. They're probably in descending order of efficiency as
> listed, although it might vary on implementation.
Received on Sat Jul 21 2001 - 18:07:10 CDT

Original text of this message

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