dbTalk Databases Forums  

Primary key field size, effect on performance?

comp.database.oracle comp.database.oracle


Discuss Primary key field size, effect on performance? in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
janne
 
Posts: n/a

Default Primary key field size, effect on performance? - 01-07-2004 , 07:54 AM






Hi,

what's the effect of primary key field size on performance, as a rule
of thumb? Let's say that NUMBER(10) would probably be suffient size
for a primary key field. What's the order of magnitude of performance
degradation if NUMBER = NUMBER(38) is used instead?

Of course, too little information to be answered precisely, but can
the difference be considerable?

How does Oracle store NUMBERs internally - does it store NUMBER(9) in
32 bits and NUMBER(10) in 40 bits, NUMBER(10) in 64 bits or how?

Reply With Quote
  #2  
Old   
support@DBtune.com
 
Posts: n/a

Default Re: Primary key field size, effect on performance? - 01-08-2004 , 03:58 AM






janne_1976 (AT) hotmail (DOT) com (janne) wrote in message news:<6539de6f.0401070554.2a08b026 (AT) posting (DOT) google.com>...
Quote:
Hi,

what's the effect of primary key field size on performance, as a rule
of thumb? Let's say that NUMBER(10) would probably be suffient size
for a primary key field. What's the order of magnitude of performance
degradation if NUMBER = NUMBER(38) is used instead?

Of course, too little information to be answered precisely, but can
the difference be considerable?

How does Oracle store NUMBERs internally - does it store NUMBER(9) in
32 bits and NUMBER(10) in 40 bits, NUMBER(10) in 64 bits or how?
Very good question, the difference is negligible the indexing leaf
'jumps' to the appropriate index. Boils down to a waste of space & how
fast your disk spindles are.

support (AT) DBtune (DOT) com
http://www.DBtune.com


Reply With Quote
  #3  
Old   
janne
 
Posts: n/a

Default Re: Primary key field size, effect on performance? - 01-12-2004 , 08:13 AM



Quote:
Very good question, the difference is negligible the indexing leaf
'jumps' to the appropriate index. Boils down to a waste of space & how
fast your disk spindles are.
What would you say about a "usual" database server with "usual" disks
and configuration (annoyingly vague, sorry - say for example some
basic Sun Fire UltraSparc box?) - is it fair enough to say that the
performance difference is probably negligible?


Reply With Quote
  #4  
Old   
freesupport@DBtune.com
 
Posts: n/a

Default Re: Primary key field size, effect on performance? - 01-12-2004 , 04:22 PM



janne_1976 (AT) hotmail (DOT) com (janne) wrote in message news:<6539de6f.0401120613.795a9da7 (AT) posting (DOT) google.com>...
Quote:
Very good question, the difference is negligible the indexing leaf
'jumps' to the appropriate index. Boils down to a waste of space & how
fast your disk spindles are.

What would you say about a "usual" database server with "usual" disks
and configuration (annoyingly vague, sorry - say for example some
basic Sun Fire UltraSparc box?) - is it fair enough to say that the
performance difference is probably negligible?
My interpretation of negligible time difference is not more than a few
seconds and so long as it's a 'usual' query, nothing fancy (or a trick
question) like a billion iterations. Each iteration will add on a
split second more, if this is the case then a huge difference can be
achieved. Please don't ask how long My original answer is based on
a simple 'usual' select statement...-Interesting no one else responded
here, this is a discussion I could be wrong, but I doubt it

FreeSupport (AT) DBtune (DOT) com
http://www.DBtune.com


Reply With Quote
  #5  
Old   
Paul Busse
 
Posts: n/a

Default Re: Primary key field size, effect on performance? - 01-13-2004 , 02:05 AM



janne_1976 (AT) hotmail (DOT) com (janne) wrote in message news:<6539de6f.0401070554.2a08b026 (AT) posting (DOT) google.com>...

Quote:
How does Oracle store NUMBERs internally - does it store NUMBER(9) in
32 bits and NUMBER(10) in 40 bits, NUMBER(10) in 64 bits or how?
You can find this part of the answer here

http://www.jlcomp.demon.co.uk/faq/num_size.html

Regards

Paul


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.