Re: what could cause my oracle sequence nextval jump?

From: Michael Moore <michaeljmoore_at_gmail.com>
Date: Mon, 6 Oct 2008 09:52:37 -0700
Message-ID: <26fdee6e0810060952o25de7f01nc96fd8a804fbda7@mail.gmail.com>


A sequence generated number should be thought of as simply a unique number. The fact that one number generated by a SEQUENCE is numerically greater than ( or less than if negative increment ) is simply for performance. Oracle could have used a random number instead, but that would create collisions and hence be less performant.It is best to think about SEQUENCE generated numbers "as though" it was a random number. If auditors need proof that nothing was deleted, then a different technique should be deployed. IMHO of course.Mike

On Sat, Oct 4, 2008 at 11:42 PM, Hemant K Chitale <hkchital_at_singnet.com.sg>wrote:

>
> "you can always run a process on the affected tables and re-set the
> sequenced value in order to avoid gaps".
>
> I don't believe this. You are ALLOWED to do that ? And your users and
> auditors don't ask questions ?
>
>
> At 12:57 AM Saturday, Bort, Guillermo wrote:
>
>> If you need secuential numbers and cannot afford either gaps or locking
>> and generating numbers with a pl/sql function, you can always run a
>> process on the affected tables and re-set the sequenced value in order
>> to avoid gaps.
>>
>> An alternative to sequences, when you cannot afford gaps is using custom
>> pl/sql functions and perhaps even Oracle Queues. This would cause a
>> serious serialization of operations though.
>>
>> Guillermo Alan Bort
>> EDS - ITO DBA Main Group
>>
>
>
> Hemant K Chitale
> http://hemantoracledba.blogspot.com
>
> "A 'No' uttered from the deepest conviction is better than a 'Yes' merely
> uttered to please, or worse, to avoid trouble."
> Mohandas Gandhi Quotes :
> http://www.brainyquote.com/quotes/authors/m/mohandas_gandhi.html
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 06 2008 - 11:52:37 CDT

Original text of this message