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: Most efficient datatype for keys???

Re: Most efficient datatype for keys???

From: Tim Witort <trw_at_medicalert.org>
Date: 1997/04/09
Message-ID: <334BC18B.7A2D@medicalert.org>#1/1

Z. Martinez wrote:
>
> I'm trying to determine the fastest datatype for a key?
> I will be using it as a primary key for a very large table.
>
> I'm currently using a number(10).
> Is there a more efficient datatype I can use for this purpose.
>
> Thanks in advance.
>
> Please respond to zlm101_at_psu.edu

The smallest column type which will allow you to uniquely code every row is about the best you can do. If you will have no more than 9,999,999, then a NUMBER(7) might work (assuming there is no loss of ID usage from deletions and subsequent inserts). Your NUMBER(10) will allow ten billion rows (now *that's* a BIG table).

But I really doubt that you will get a significant performance boot or drag by changing the key column by a few bytes. As long as the resulting key is unique and has an index on it... should be plenty snappy.

Received on Wed Apr 09 1997 - 00:00:00 CDT

Original text of this message

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