Re: how to get more than ID value using nextval ???

From: Ethel Aardvark <bigjobbies_at_hotmail.com>
Date: 7 Jan 2003 00:49:31 -0800
Message-ID: <1a8fec49.0301070049.711e3205_at_posting.google.com>


Alexander.Kuznetsov_at_marshmc.com (Alexander Kuznetsov) wrote in message news:<ac5bc7c1.0301030937.2dc4f585_at_posting.google.com>...
> Hi Mohamed,
> > table_seq.nextval to get next ID. but I think there must be better way not
> > to call it 1000 time. anybody has any idea ???
>
> there is a better way, chapter 2 of this article:
> http://www7b.boulder.ibm.com/dmdd/library/techarticle/0209kuznetsov/0209kuznetsov.html

You could set the increment value on the sequence to, say, 50. Then (as long as the app knows this - it would be worth it checking once at startup) it can get one .nextval safe in the knowledge that the next 49 values can not be allocated to anyone else.

EA Received on Tue Jan 07 2003 - 09:49:31 CET

Original text of this message