I think that you have chosen just about the worse possible technique for deleting these rows.
Firstly, you are commiting within a cursor, and that is asking for trouble.
Secondly you are trying to proceduralize the process, when it would be simpler, faster and more reliable just to perform simple SQL operations.
How about this ...
If you don't have enough RBS space to do the delete in one go, just keep on ...Code:delete from tb_name where f_a=xxx and f_b=yyy;
... until no more rows are deleted.Code:delete from tb_name where f_a=xxx and f_b=yyy and rownum < 100001;
Keep it simple, and keep it in SQL.




Reply With Quote