Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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