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: NUMBER vs NUMBER (n)

Re: NUMBER vs NUMBER (n)

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 30 Sep 2006 10:09:39 -0700
Message-ID: <1159636179.586983@bubbleator.drizzle.com>


Mark Townsend wrote:
>

>>
>> 2) For surrogate key, is it better to use INTEGER, or NUMBER or NUMBER
>> (n) ? why ?
>>
>> Thank you,
>> xtanto

>
> Neither - store surrogate keys in VARCHAR2 columns - typically you are
> unlikely to need to perform arithmetic on a surrogate key.

In principle I agree. If it isn't being used for purposes of calculation it isn't a number.

But Sybrand's point is important as well. Oracle typically does a far more efficient job joining number than strings.

Perhaps another optimization project for 11g.

-- 
Daniel Morgan
University of Washington
Puget Sound Oracle Users Group
Received on Sat Sep 30 2006 - 12:09:39 CDT

Original text of this message

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