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: Do Sequences Have Any Disadvantages?

Re: Do Sequences Have Any Disadvantages?

From: Robert W. Swisshelm <swisshelm_at_lilly.com>
Date: 1997/02/10
Message-ID: <32FF13AF.1412@lilly.com>#1/1

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.com
Received on Mon Feb 10 1997 - 00:00:00 CST

Original text of this message

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