I noticed that, in Mysql, when enabling log_queries_not_using_indexes
, slow_query_log
and long_query_time
, the generated slow query log file will contain a lot of queries even if the query time is far less than long_query_time
.
It seems that once the log_queries_not_using_indexes
is enabled, Mysql will log all the queries that not using indexes no matter what the "long_query_time" is.
Is there a way to overcome this? I mean, is there a way to log all the queries which take longer time than long_query_time
, regardless of whether they are using indexes?