Bug #69295 | Slow_queries status variable incremented when it should not | ||
---|---|---|---|
Submitted: | 21 May 2013 16:22 | Modified: | 22 May 2013 9:04 |
Reporter: | Cyril SCETBON | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Options | Severity: | S3 (Non-critical) |
Version: | 5.1.44, 5.6.10 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | slow queries |
[21 May 2013 16:22]
Cyril SCETBON
[22 May 2013 8:15]
MySQL Verification Team
Hello Cyril, Thank you for the feedback. At first, this sounds as if NOT A BUG, since it is known fact that Slow_queries count is determined based on the queries logged to slow query log and the following order to determine whether to write a query to the slow query log: - The query must either not be an administrative statement, or --log-slow-admin-statements must have been specified. - The query must have taken at least long_query_time seconds, or log_queries_not_using_indexes must be enabled and the query used no indexes for row lookups. - The query must have examined at least min_examined_row_limit rows. - The query must not be suppressed according to the log_throttle_queries_not_using_indexes setting. So, looking at the "select count(*) from t;" it certainly fall into the second category i.e log_queries_not_using_indexes must be enabled and the query used no indexes for row lookups. So, looks like a FR for a new status variable called "query_not_using_indexes" or something... to separate actual slow queries must have taken at least long_query_time seconds and those used no indexes for row lookups.
[22 May 2013 8:15]
MySQL Verification Team
Normally, "slow_queries" is the number of queries written to the slow log for some reason. that reason might be no indexes or duration is too long. docs could be clearer then. and server could be clearer by providing another status variable.
[22 May 2013 9:04]
Cyril SCETBON
I understand, but your documentation should be updated too cause that's really sounds like a bug after having read it. That's the first time I see the different cases you announced concerning this counter value, if it's already documented somewhere, the documentation of this counter should point to it too.