The mysql slow query log shows query time in whole integers.

# Query_time: 0  Lock_time: 0  Rows_sent: 177  Rows_examined: 177
# Query_time: 1  Lock_time: 0  Rows_sent: 56  Rows_examined: 208

There was a microsecond patch to allow mysql to be configured to log queries that take longer than X microseconds to run. But is there a way to have the log output the query time in either milliseconds or microseconds?

  • what version of mysql? This is built into 5.1.21 and above, and is logged as microseconds. I just confirmed it is working on my 5.1.40 instance. – MattB Jun 8 '10 at 15:20

try this: Slow Query Log Extended Statistics

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.