Bug #32995 MYSQL SLOW QUERY LOG in Seconds
Submitted: 5 Dec 2007 10:15 Modified: 5 Dec 2007 10:24
Reporter: Frank Mussmann Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: log, long, MySQL, query, SECONDS, slow, time

[5 Dec 2007 10:15] Frank Mussmann
The Mysql gives me the possibility to log slow queries with the long_query_time parameter. Unfortunately the parameter is just given in seconds which is far beyond the time, I need to log. This Parameter shall be in the range of milliseconds to be a better check for many users. When my databases react in more than 90% in 4-10 ms, any exceptions of more than 400ms is critical.

How to repeat:
Look in the documentation or the my.cnf files. :-)

Suggested fix:
In the Server-Kernel the whole procedure of logging slow queries must be redefined to give a broader check of "slow" queries.
[5 Dec 2007 10:24] Mark Leith
This is fixed in 5.1, which takes microsecond values :


'Prior to MySQL 5.1.21, the minimum value is 1, and the value for this variable must be an integer. Beginning with MySQL 5.1.21, the default is 0, and a resolution of microseconds is supported when logging to a file. However, the microseconds part is ignored and only integer values are written when logging to tables.'