Re: Incrementation in Oracle

From: Victor Séguy <vseguy_at_free.fr>
Date: Thu, 30 Nov 2000 11:30:32 GMT
Message-ID: <3A264895.51A58C64_at_free.fr>


Again a question !!!
If i set a cache option for a sequence, it accelerate the operation when i generate a sequence number but does it accelerate it too when i retrieve the sequence number with a :
select num(seq number) from table_name

Thank's for your answer !!!

Victor Séguy wrote:

> 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 - 12:30:32 CET

Original text of this message