Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence Number Loss
On Fri, 08 Jan 1999 02:18:43 GMT, zhan <zhang_at_visi.net> wrote:
> Suggestions sought: we want to use Sequence as our primary key
> source because they are guranteed to be unique and
> have good perfomance, but we also want the number to
> be consecutive( at least most of the time). Any suggestions
> and advices are highly appreciated.
This happens because numbers in the sequences are cached in order to increase performance. To avoid this when you create the sequence use the NOCACHE option for the sequence:
ALTER SEQUENCE schema.sequence NOCACHE;
or use the NOCACHE option when you create the sequence.
James Petts Received on Fri Jan 08 1999 - 02:31:19 CST