MySQL Forums
Forum List  »  Newbie

Re: Mysqld.exe cpu spikes
Posted by: Rick James
Date: June 22, 2015 07:41PM

Find the slow query:

Plan A:
1. Turn on the slowlog with long_query_time = 1.
2. Wait a day.
3. Run pt-query-digest against the slowlog.

Plan B: Alternatively, steps 1,2,3 could be replaced (somewhat haphazardly) by repeatedly doing
SHOW FULL PROCESLIST;
Look for any non-Sleep process that has a high Time. That is a likely candidate for the naughty query.

Once you have found it,...
Present the first query or two to us for critique. Please include
SHOW CREATE TABLE
EXPLAIN SELECT ...

There are far too many possible fixes to detail them without knowing the specific query.

Options: ReplyQuote


Subject
Written By
Posted
June 19, 2015 09:51PM
Re: Mysqld.exe cpu spikes
June 22, 2015 07:41PM
June 27, 2015 06:50AM
June 30, 2015 05:04PM


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.