Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sequence count not correct

Re: sequence count not correct

From: Brian Peasland <peasland_at_email.msn.com>
Date: Thu, 15 Jul 1999 18:04:11 -0500
Message-ID: <eGImzZxz#GA.435@cpmsnbbsa02>

>can I manual adjust this sequence? or it it better to use a number and
>count +1?

To create the sequence without caching the next value(s), try this:

   CREATE SEQUENCE seq_x
   START WITH n
   INCREMENT BY i
   NO CACHE; The first number in the sequence is n, the next number is n+i, the next one (n+i)+i. You probably already knew that. Generally, i=1. The NO CACHE option will not store the next sequence numbers in cache. When the DB is restarted, you will not lose the next numbers in the sequence. But this comes at a penalty. Generating the next number in the sequence (seq_x.NEXTVAL) will take longer than if the value was cached.

Hope that helps,
Brian Peasland
peasland_at_msn.com Received on Thu Jul 15 1999 - 18:04:11 CDT

Original text of this message

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