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: Roger Jackson <rjackson_at_wire.net.au>
Date: Mon, 28 Jun 1999 21:00:34 +1000
Message-ID: <7l7l5s$p5k$1@caley.wire.net.au>


Wassim,

Here is a list of possible reasons why values of sequence numbers may be lost.

  1. Individual sequence numbers can be skipped if they were generated and used in a transaction that was ultimately rolled back. The sequence is incremented independent of the transaction committing or rolling back. This will occur regardless of the sequence being cached.
  2. The same sequence can be used for one or multiple tables. It is possible that individual sequence values may appear to be skipped because it is being used for multiple tables.
  3. If a sequence is cached, the unused cached sequence values may be lost if there is a system failure (shutdown abort or system crash).
  4. If the value of "SEQUENCE_CACHE_ENTRIES" "init.ora" parameter is too low, it is possible to skip sequence values. If the number of cached sequences is greater than "SEQUENCE_CACHE_ENTRIES", then a sequence cache may be aged out of the SGA. If a request is made for a sequence that is not in the cache and there are no free entries, the oldest on the LRU list is deleted and replaced with the newly requested one. All of the remaining values in the displaced sequence are lost.
  5. In 7.3 the functionality of the caching of sequences was changed. Prior to 7.3, the sequence cache was kept in the row cache. In 7.3+ the sequence cache was moved to the library cache. Oracle Bug 432251 identified the cached sequence was being aged out of the library cache too rapidly. This bug is fixed in 7.3.4.

I hope this helps.

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 Mon Jun 28 1999 - 06:00:34 CDT

Original text of this message

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