MySQL Forums
Forum List  »  InnoDB

Re: Delete statement taking more time for deleting 1 million records
Posted by: Chrisa Torain
Date: October 25, 2014 01:10AM

This will help you to speed up deletion.
Delete the records in chunks. (i,e making the transaction smaller).
The chunk size should be selected in a such it wont take more than 3-5 sec.
Use the "between and" condition in where clause instead of a < or > . ( B+tree works well in a range condition).
If possible use primary key in where clause by fetching the min() and max() pk for that condition.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Delete statement taking more time for deleting 1 million records
1483
October 25, 2014 01:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.