Bug #8043 long query time only integers
Submitted: 20 Jan 2005 13:11 Modified: 4 Oct 2007 16:48
Reporter: Frank Mussmann Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Michael Widenius CPU Architecture:Any

[20 Jan 2005 13:11] Frank Mussmann
Description:
The log_slow_query function is a good idea, but there's one point, which is not so good for my applications (and I think for other users).
My Applications are somewhere called "Real-Time"-near. I don't have queries which take more than 1 sec.

It would be more interesting for me to log queries which use more time than x ms (milliseconds).
Is there a possibility to make the long_query_time a float or a millisecond value ?

How to repeat:
see 
MySQL>show variables like '%slow_quer%';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| log_slow_queries | ON    |
+------------------+-------+
1 row in set (0.00 sec)

MySQL>show variables like '%long_query%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| long_query_time | 1     |
+-----------------+-------+
1 row in set (0.00 sec)

The value in long_query_time is a integer which stands for seconds.
[22 Feb 2006 11:14] Valeriy Kravchuk
Thank you for a reasonable feature request. Yes, sub-second precision in query execution time measurement will be useful in many cases.
[4 Oct 2007 16:48] Michael Widenius
Thank you for your bug report. This issue has already been fixed in the latest released version 5.1 (at least 5.1.21 and above)