Sequences and Performance [message #58348] |
Mon, 18 August 2003 01:30 |
Warrick Jackson
Messages: 1 Registered: August 2003
|
Junior Member |
|
|
I am attempting to manage the implementation of an application and have found that the developer has created a sequence for every table as a means of obtaining a unique primary key.
Does anyone have an opinion on this in terms of performance, functionality etc?
|
|
|
|
Re: Sequences and Performance [message #58368 is a reply to message #58353] |
Tue, 19 August 2003 12:26 |
pwl
Messages: 22 Registered: May 2000
|
Junior Member |
|
|
If you use sequences to generate the primary key,
you can get the situation of duplication:-
Remember that the database is only a model of the
real world. It is very rare that you cannot find a
unique key (made up perhaps of many columns) that
identifies the item you are storing data about.
But with artificial keys (ie sequences) it can be
possible for the same 'real world' item to appear on
your database more than once, identified by
completely unique keys.
I feel that this is duplication and wrong.
Also, since Oracle keeps its keys in a BTree, you
will get skewed primary key indexes, and will may
find that some access is slow.
just my 2c worth
pwl
|
|
|