Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why Sequence jumps?
It is wide-known fenomena.
The sequences uses cache of numbers for fast work.
The default value for it is 10.
The all 10 numbers will loaded into cache when user process get first
NextVal.
And if an user process falls down, gotten numbers dissappears.
Therefore the gaps appears.
You can regulate the sequence cash by
ALTER SEQUENCE CACHE ...
Also you would need to increase "sequence_cache_entries" parameter
if used many sequences in database at the same time.
[ If the value for SEQUENCE_CACHE_ENTRIES is too low, Oracle might skip sequence values, as in the following scenario: assume you are using five cached sequences, the cache is full, and SEQUENCE_CACHE_ENTRIES = 4. If four sequences are currently cached, then a fifth sequence replaces the least recently used sequence in the cache and all remaining values (up to the last sequence number cached) in the displaced sequence are lost. ] Oracle Doc.
Mark Malakanov
Wassim <net2000_at_francemel.com> wrote in message
news:7l5kd2$qi9$1_at_nnrp1.deja.com...
> Hi,
> I'm using Sequences (as many of you told me to do, for generating a
> primary keys in some tables) Strange phenomenen i've noticed is that in
> some cases counter jumps from 21 to 40 or 11 to 34 ? this is source of
> my sequences :
>
> create sequence mvt_seq
> start with 0
> increment by 1
> nomaxvalue
> minvalue 0
> nocycle
> order (cos order is important for me!)
>
> Is there any problem with this?
> Thanks for help!
>
> Wassim.
> e-mail: net2000_at_francemel.com
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Sun Jun 27 1999 - 12:24:39 CDT