Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sequence Numbers Fast ?
They should be much faster than this. The only problem I can remember with
sequence numbers is when running on clusters but even this wouldn't explain
your performance issues. Don't use a work around try and find out the cause as
it seems you have a serious problem.
Phil Maechling wrote:
> I have an application that uses the Oracle sequence number feature.
> We call nextval(dual) to get a sequence number.
>
> However measurements show that getting sequence numbers is very
> slow. To get 80 sequence numbers, it is taking 20 seconds.
>
> I've tried raising the cache on the sequence number involved, but
> that doesn't seem to improve it to as much as I need.
>
> Is there any way to get sequence numbers out of the system faster
> than calling nextval.
>
> Are any of the following ideas worth pursuing ?
>
> * Even bigger cache (its currently set to 2xMAX number of entries
> I expect (1000))
>
> * Is there some what to ask for a group of numbers at a time ? Currently I
> have to call nextval 300 times if I need 300 numbers.
>
> * Implement a stored procedure which can retrieve a set of numbers
> on a single call. If this procedure is based on calling nextval,
> it will still need to call nextval 300 times, but it may be
> faster than 300 application program calls.
>
> Any ideas, comments or suggestions would be appreciated.
>
> Thanks,
> Phil Maechling
> phil_at_gps.caltech.edu
Received on Sat Sep 25 1999 - 18:08:17 CDT
![]() |
![]() |