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: Why Sequence jumps?

Re: Why Sequence jumps?

From: Mark Malakanov <markmal_at_sprint.ca>
Date: Sun, 27 Jun 1999 14:24:39 -0300
Message-ID: <AYtd3.165480$r_1.38357205@newscontent-02.sprint.ca>


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

Original text of this message

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