MySQL Forums
Forum List  »  InnoDB

Delete statement taking more time for deleting 1 million records
Posted by: Raja Palanichamy
Date: October 17, 2014 08:50AM

Hi,

we have more than 2 millon records on the mysql database table and wanted to delete 1 million records from that. i am using delete statement with limit 10000 records which each statement is taking 2 to 4 minutes to complete it. which is the best way to delete all 1 million records in less time.

Query OK, 10000 rows affected (2 min 31.34 sec)

Query OK, 10000 rows affected (2 min 30.13 sec)

Query OK, 10000 rows affected (2 min 34.43 sec)

Query OK, 10000 rows affected (2 min 47.65 sec)

Query OK, 10000 rows affected (3 min 16.00 sec)

Query OK, 10000 rows affected (3 min 35.04 sec)

Query OK, 10000 rows affected (4 min 15.93 sec)

Query OK, 10000 rows affected (4 min 53.16 sec)

Query OK, 10000 rows affected (5 min 45.03 sec)

Regards,
Raj

Options: ReplyQuote


Subject
Views
Written By
Posted
Delete statement taking more time for deleting 1 million records
4276
October 17, 2014 08:50AM


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.