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: unsequential sequences

Re: unsequential sequences

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 08 Jul 2005 14:10:16 -0700
Message-ID: <1120857025.343793@yasure>


Kevin Blount wrote:
> This may have aked before, but my searching for such threads didn't get
> the help I need, so here we go (again):
>
> I have a sequence and trigger that allow me to automatically assign an
> "ID" to a table record. The sequence has the following properties (let
> me know if I missed anything out)
>
> minimum = 1
> maximum = 1.0E28
> interval = 1
> last number = 281
>
> cycle values = unselected
> order values = unselected
> Cache = default
>
> the problem is that the IDs created tend to a) end in 1 and b) jump 20
> numbers.
>
> if I were to insert a new record on two different days, the changes are
> that the IDs would be 301 and 321 (based on the last number above).
> However, if I were to add them both at the same time, or within a small
> time period) they would probably be 301 and 302.
>
> My DB admin has spotted the issue, but doesn't know the cause or the
> fix.
>
> Can anyone help? I doesn't really effect any of the scripts I'm
> writing, but when those IDs are visible it make my applications look
> wierd, when 90% of the assigned IDs end in 1, ya dig?
>
> thanks for reading.. many thanks for replying :)

CREATE SEQUENCE myseq NOCACHE;

http://www.psoug.org
click on Morgan's Library
click on Sequence

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Jul 08 2005 - 16:10:16 CDT

Original text of this message

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