Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to avoid rollback during some INSERTs ?
Two possibles....
There is a syntax for create table that does commits every so many records. Obviously, you need to create the table each time, etc.
Use PL/SQL to create a smaller selection of row which are inserted and commited. eg
declare cursor myCur is select <some constraint> .... begin for myRow in myCur loop insert into toto values(...) select ....where <some contraint available in myRow> commit; end loop; end;
Mike Krolewski
El Gringo wrote:
> Hi.
>
> I have some inserts (insert into toto values(...) select ....) that are pretty huge.
> usually, they explode the rollbacks (the table is indexed by two indexes, which
> make the charge heavier on the rollback).
> So what I do, I insert into this table by chunks of 10000 rows.
>
> But I would like to know if there is some simple way to avoiding using rollbacks
> during some inserts (like NOLOGGING avoid using logs) ????
>
> I don't care if the information would not be restorable, because if something wrong
> happens, I know eaxctly which rows I remove (referenced by a date).
>
> So any suggestions ?
>
> thanks in advance.
> Riad
> ----------------------------------------------
> To email, replace the "ANTI-SPAM.ORG" by "com"
> ----------------------------------------------
Received on Sat Jan 23 1999 - 23:20:45 CST