RE: HOW TO SET SEQUENCE VALUE

  • From: "Taylor, Chris David" <ChrisDavid.Taylor@xxxxxxxxxxxxxxx>
  • To: "'ilmar.kerm@xxxxxxxxx'" <ilmar.kerm@xxxxxxxxx>, 'Oracle-L Freelists' <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 29 Mar 2012 07:17:47 -0500

Ilmar, 
I wasn't advising anything :)

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@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] 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

On Thu, Mar 29, 2012 at 2:49 PM, Taylor, Chris David 
<ChrisDavid.Taylor@xxxxxxxxxxxxxxx> wrote:
> CACHE_SIZE = 20?
>
> Create sequence NOCACHE
>
> 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@xxxxxxxxxxxxx 
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of jose soares
> Sent: Thursday, March 29, 2012 6:24 AM
> To: oracle@xxxxxxxxxxxxxxx
> Cc: oracle-l@xxxxxxxxxxxxx
> Subject: Re: HOW TO SET SEQUENCE VALUE
>
> I can't understand these two queries:
>
> select last)number from user_sequences where sequence_name='ANAGRAFICA_SEQ'
> last_number
> ---------------------
> 24
>
> select anagrafica_seq.nextval from dual nextval
> -------------------------------
> 5
>
> I expect to see 24 instead of 5.
> last_number is not the same value incremented by nextval ?
>
> j


--
Ilmar Kerm
--
//www.freelists.org/webpage/oracle-l



--
//www.freelists.org/webpage/oracle-l


Other related posts: