Entries in the slow log have a timestamp. You can read the file directly, but it's much
easier to use a tool like maatkit for parsing the results of the log.
From: Milan Andric [mailto:mandric@stripped]
Sent: Friday, July 31, 2009 11:15 AM
Subject: logging slow queries with time
I'm serving a burly Drupal install and at some points throughout the
day the mysql threads go way up and iowait peaks. I'm not sure which
is causing which but during this time the server is unresponsive. I
would like to determine if there is a poorly optimized query causing
this. I'm logging slow queries but is there a way to see when the
slow queries take place also? I'd like to know what queries are being
processed during this window of poor response time, usually around
noon local time.
Thanks in advance,
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1
The information contained in this transmission may contain privileged and confidential
information. It is intended only for the use of the person(s) named above. If you are not
the intended recipient, you are hereby notified that any review, dissemination,
distribution or duplication of this communication is strictly prohibited. If you are not
the intended recipient, please contact the sender by reply email and destroy all copies of
the original message.