MySQL Forums
Forum List  »  Performance

Re: MySQL query execution time differs between executions
Posted by: Rick James
Date: November 16, 2014 03:24PM

Please provide context for that EXPLAIN --
Show us the SELECT, and
SHOW CREATE TABLE for each table.

> then it deletes and updates in the original big table one by one accordingly

Look into multi-table DELETE and UPDATE. You can probably do the DELETE/UPDATE in a single SQL statement instead of many.

> after a DB restart, the same query takes 20 seconds or more

Possible cures:
* Don't restart the db.
* Make the query more efficient.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MySQL query execution time differs between executions
1080
November 16, 2014 03:24PM


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.