I am wondering is there any other way to to check our slow queries without logging slow query. Suppose, I have a highily busy server can't afford to log much to save memory and I/Os. Then, is there any other way available to check if I have a slow query? I know, we can do profiling of the query but still not sure what exactly to do to identify which query is the one taking most of the time and memory.
Just started mysql administration and not sure how to handle this. Any guidance will be highly appreciated.
Best Answer
If you do not want to enable the slow query log at all, I have a suggestion
You can use pt-query-digest over an interval of time.
I have suggested this a few times in the DBA StackExchange
Nov 24, 2011
: MySQL general query log performance effectsApr 24, 2012
: Investigate peak in MySQL throughputJul 26, 2012
: What is running right now?If you look at my
Nov 24, 2011
link, I provided a shell script you can crontab to launch pt-query-digest.GIVE IT A TRY !!!