RE: HOW TO SET SEQUENCE VALUE

From: Taylor, Chris David <ChrisDavid.Taylor_at_ingrambarge.com>
Date: Thu, 29 Mar 2012 07:49:45 -0500
Message-ID: <C5533BD628A9524496D63801704AE56D6ADD8111FE_at_SPOBMEXC14.adprod.directory>



Howard,

It seems to me that NOCACHE numbers can only be 'lost' if they are selected but never used by a session?

As the values are not stored in memory, they should not be lost by being aged out or instance restarts - right?

Can you clarify an instance where a NOCACHE sequence number would be lost?

Thanks,

Chris Taylor

"Quality is never an accident; it is always the result of intelligent effort." -- John Ruskin (English Writer 1819-1900)

Any views and/or opinions expressed herein are my own and do not necessarily reflect the views of Ingram Industries, its affiliates, its subsidiaries or its employees.

-----Original Message-----
From: Howard Latham [mailto:howard.latham_at_gmail.com] Sent: Thursday, March 29, 2012 7:44 AM
To: Taylor, Chris David
Cc: ilmar.kerm_at_gmail.com; Oracle-L Freelists Subject: Re: HOW TO SET SEQUENCE VALUE

Beware sequence number can be lost even with nocache. You cannot use them as a contiguous numbering system where missing numbers will cause questions. Best rule of thumb don't use them if someone will look at them.

On 29 March 2012 13:27, Taylor, Chris David <ChrisDavid.Taylor_at_ingrambarge.com> wrote:
> Also be advised that sequences can age out of the cache and lose your cached values.  The next time the sequence is called a new cache of numbers is generated and the unused sequence values [before it was aged out] are 'lost'.
> (I wanted to verify that info was correct before I posted so I double
> checked)
>
>
>
> Chris Taylor
>
> "Quality is never an accident; it is always the result of intelligent effort."
> -- John Ruskin (English Writer 1819-1900)
>
> Any views and/or opinions expressed herein are my own and do not necessarily reflect the views of Ingram Industries, its affiliates, its subsidiaries or its employees.
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ilmar Kerm
> Sent: Thursday, March 29, 2012 7:01 AM
> To: Oracle-L Freelists
> Subject: Re: HOW TO SET SEQUENCE VALUE
>
> Quite dangerous advice, I think... Cache is a very important part of sequence performance (and maybe the default 20 is too low nowadays also). Using NOCACHE should be a very rare occasion, when "losing"
> sequence numbers on instance restarts is not allowed.
> USER_SEQUENCES just reports what value is stored in data dictionary, but database instance is giving out cached sequence numbers. So the difference is normal.
>
> Ilmar
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
Howard A. Latham


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 29 2012 - 07:49:45 CDT

Original text of this message