Deletion of data in chunk [message #63752] |
Thu, 04 November 2004 17:37 |
Smita
Messages: 10 Registered: July 2002
|
Junior Member |
|
|
Hello,
I have written SQL script and want to delete a table rows depending on the nested select query.
My query is DELETE FROM MASTER WHERE ID IN (SELECT ID FROM INFO).
The info table may return 10000 rec and it have to be deleted. But i have some issue about the rollback segment error.
So i want a logic to delete certain number of records at a time. I.e. say 5000 records. And every deletion i want to commit the deletion.
Can any one help me..
Thanks in advance.
Smita
|
|
|
Re: Deletion of data in chunk [message #63760 is a reply to message #63752] |
Fri, 05 November 2004 03:15 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>>i have some issue about the rollback segment error.
what error?
Please post the complete error message , oracle version.
If it is ora-1555 you need to properly size the RBS.
>>And every deletion i want to commit the deletion
frequent commit would be costly.
It may look like, committing frequently will avoid ora snapshot too old error (ora-1555) , but the ideal solution is to resize your RBS.
>>want a logic to delete certain number of records at a time. I.e. say 5000 records
You can use a mod function
Please have a look here
http://www.orafaq.net/msgboard/plsql/messages/12341.htm
|
|
|