Originally posted by ganga
Hi ,
This code sniffet may help you
Use commit between inserts when you do bulk insert;
For example commit insert for every 1000 row insert


declare
x number =0;
a number a.eno%type;
b number b.ename%type;
... ...;
... ...;
... ...;
n .... ...;
begin
cursor c1 is select * from table1;
open c1;
loop
fetch c1 into a,b,.......n;
insert into tableb values(a,b,.........);
x=x+1;
if (x=1000)then
commit;
x=0;
end if;
end loop;
end;
/


Tks
Gangadhara
This is a great way to get a snapshot too old error -- commiting within a cursor like this is very bad practice.

How about setting the target table to nologging, and using "insert /*+ append */ into ..."? That'd help, i would think.

You might also disable any nidexes on the target table, set skip_unusable_indexes=true, perform your insert, then rebuild the indexes.