The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question.
Asked: August 03, 2017 - 9:58 am UTC
Last updated: August 03, 2017 - 11:21 am UTC
Version: 11g
Viewed 10K+ times! This question is
declare begin OPEN cur_get FOR SELECT * FROM table a; loop fetch cur_get bulk collect into rec_collection limit 5000; exit when rec_collection.COUNT = 0; EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML'; EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 16'; FORALL i IN 1..rec_collection.COUNT DELETE /*+ PARALLEL(table a,16) */ FROM table a WHERE .. ..; COMMIT; end loop; end; declare begin OPEN cur_get FOR SELECT * FROM table a; loop fetch cur_get bulk collect into rec_collection limit 5000; exit when rec_collection.COUNT = 0; EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML'; FORALL i IN 1..rec_collection.COUNT DELETE /*+ PARALLEL(table a,16) */ FROM table a WHERE .. ..; COMMIT; end loop; end;
Get all the information about database performance in the Database Performance guide.