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/Trigger problem

Re: Sequence/Trigger problem

From: Dirk Tschentscher <dirk.tschentscher_at_volkswagen.de>
Date: Thu, 31 Oct 2002 12:28:04 +0100
Message-ID: <apr8ql$ol52@doiweb4.volkswagen.de>


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

Original text of this message

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