0

Motivation : understand the highest CPU\usage\long_query of historic queries running on production.

example :10 minute ago on server x graph showed high CPU usage.

I thougth for next steps :

  • Collecting the slow_query_log and move to another machine for storage and analyzing

  • Analyze production general log for better understanding .With which queries i should handle (active general_log for once a day for 20 minutes in production)

any better suggestions ?

1

I prefer the slowlog. But I also like to crank long_query_time down to 1.0 or less.

Use pt-query-digest to analyze the log. This can be done without copying it to another machine.

(Check the arguments to that tool to see if it can limit the output to a given time period.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.