MySQL Forums
Forum List  »  InnoDB

Re: Shudden Slow down of MySQL Queries
Posted by: jayaram pagoti
Date: November 03, 2014 04:01AM

James, Really great ! about these suggestions.

>> SELECT @cutoff := id FROM tbl WHERE ... ORDER BY id LIMIT 1000,1;
>> DELETE FROM tbl WHERE ... AND id < @cutoff ORDER BY id;

Actually, as you guess our table design is not support to delete the rows based on id( ex data : 1-room1-2014-10-01 , 2-room1-2014-10-02, 3-room2-2014-10-01 ...)

total number of rows in this table : 42577651. daily we are deleting 64000 rows ( which are relate to a day ).

Hence, based on your suggestions and all. We are planning to delete 1000 rows at a time ( instead of deleting all rows in a single transaction, we are planning commit the data changes for every 1000 rows deletion. )

Please suggest !

Options: ReplyQuote


Subject
Views
Written By
Posted
1888
October 24, 2014 04:50AM
1316
October 26, 2014 11:53AM
1191
October 27, 2014 11:43AM
1234
October 28, 2014 02:24PM
979
October 29, 2014 08:18AM
Re: Shudden Slow down of MySQL Queries
1238
November 03, 2014 04:01AM


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.