Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SEQUENCE/TRIGGER Problem

Re: SEQUENCE/TRIGGER Problem

From: Dennis Wehlmann <Dennis.Wehlmann_at_brr.de>
Date: Fri, 05 Feb 1999 12:34:35 +0100
Message-ID: <36BAD74B.1AC30AEC@brr.de>


Chris Capson wrote:
>
> I am using a sequence In conjunction with a trigger to create an autonumber
> field everything seems be working fine except for every once and a while
> when I insert a record the sequence seems to jump over numbers in the
> sequence.
>
> Example:
>
> The sequence creates 1,2,3,4,5,10,11,12,21.
>
> Does anybody know what Might be causing this??
>
> Thanks
> Chris Capson

The DBMS preallocates sequence values for faster access. The allocation is related to a session. Usually the system preallocates more than one value. If the session finished the allocated values are lost. If you create a sequence you can define how many values the system will preallocate. Use CREATE SEQUENCE ... CACHE number ... to define the cache size.

Regards
Dennis Received on Fri Feb 05 1999 - 05:34:35 CST

Original text of this message

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