Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sequence/Trigger problem
Hi Volker,
In this case every "select nextval" will get the next (=> currval + 1)
number.
But if one insert fails, the "nextval" is lost and you've got a broken
sequence again.
I don't know, if you'll get a performance problem with this.
Maybe you try and post it ?
I never had a problem with this yet...
rgds
Dirk
"Volker Schmid" <Info_NoSpam_at_Inspirant.de> schrieb im Newsbeitrag
news:app0k8$773$1_at_news.online.de...
> Hi Alan, Dirk,
>
> What if I use:
>
> CREATE SEQUENCE USERS_SEQ START WITH 1 INCREMENT BY 1 NOCACHE;
>
> Is it then better? How does this affect the performance of insert's? If I
> use CACHE 20 and the application insert's the 21'th row - is Oracle then
> reloading the sequence-cache every 20'th row from disk? In this case,
isn't
> it a problem if the cache is smaller than the number of inserted rows?
>
> Thanks,
>
> Volker
>
Received on Thu Oct 31 2002 - 05:28:04 CST