Re: Incrementation in Oracle

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 30 Nov 2000 21:10:00 +0100
Message-ID: <906c3v$3rei$2_at_ID-62141.news.dfncis.de>


If you use the cache option you will 'loose' sequence number whenever the database is restarted. The poster wants a key without any 'holes'. Setting nocache doesn't accelerate sequence generation, on the contrary, but that wasn't the requirement in this case.

Hth,

Sybrand Bakker, Oracle DBA

"Victor Séguy" <vseguy_at_free.fr> wrote in message news:3A26425D.8FB0CC9A_at_free.fr...
> I don't understand why sequence should be created with nocache option ?
> Doesn't the nocache option accelerate the generation of the sequence ???
>
> Sybrand Bakker wrote:
>
> >
> > Sorry to disagree with you.
> > If it is really important that surrogate keys (which is what sequences
 are
> > usually applied for) are really continuous the sequence should be
 created
> > with the nocache option.
> > Also, IMO, I don't believe the advantage of having no 'holes' outweighs
 the
> > performance decrease (and potential locking problems) not using
 sequences.
> >
> > Regards,
> >
> > Sybrand Bakker, Oracle DBA
>
Received on Thu Nov 30 2000 - 21:10:00 CET

Original text of this message