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: Sequence Number Loss

Re: Sequence Number Loss

From: James Petts <jpetts>
Date: Fri, 08 Jan 1999 08:31:19 GMT
Message-ID: <3695c17c.67699076@firewall.celltech>


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

Original text of this message

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