Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Do Sequences Have Any Disadvantages?
Tom McCready wrote:
>
> I would like to hear when it is appropriate to use Sequences
> and when it is not. Are there disadvantages to Sequences which
> would force us to keep our own table of high keys, incremented
> by one each time a record is added?
> Many of our applications use a "one-up" number. The Sybase
> implementation has some disadvantages. How about the Oracle
> implementation? Thank you,
> Tom McCready, DBA, Library of Congress 202-707-5511
> --
> MZÂ
The only 'disadvantage' that I can think of is that it there is no
guarantee that every sequence number will be used.
For example, assume that a process claims a sequence number, these does a rollback rather than a commit. That sequence number is 'lost'.
If it is an absolute requirement that you track each value, you could do a commit after the sequence number is generated but before you change any of your real data.
-- Bob Swisshelm Eli Lilly and Company swisshelm_at_lilly.comReceived on Mon Feb 10 1997 - 00:00:00 CST