I have a delete query like:
delete from table1 where dataA between Date1 and Date2
I receive an error:
Caused by: java.sql.SQLException: ORA-01628: max # extents (10100) reached
for rollback segment.
I would like to fix the delete statement by adding
AND ROWNUM < 200
Is this the correct way to resolve the problem (table contains blob columns — for this reason I suppose rollback segment is small)?
I do data warehouse bulk processing in Oracle and your method is perfectly fine. I would like to tell the dba to say hey add a ton of rollback/tmp space so we never run into this… but as with many clients… resources are many times outside of our control.
What i do in any repetitive delete operation that you just want to delete in chunks is the following (Oracle Pl/sql example but will port to any language) Keep in mind this solution is only for a delete from without conditional where expression(your example)… if you had a where condition i would recommend fetching rowid’s/keys into array first in bulk and the looping deleting in chunks…