Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5
Description
In
https://mariadb.com/kb/en/server-system-variables/#log_slow_filter
is documented
" If a query matches one of the types listed in the filter, and takes longer than long_query_time, it will be logged" |
So long_query_time is a mandatory condition for log_slow_filter.
So log_slow_filter and log_slow_filter must be fulfilled.
But this is not the case for option
"not_using_index".
If you add "not_using_index" to log_slow_filter
it logs into slow_log, even if the execution time is less than "log_slow_filter" long_query_time.
The root cause is, that adding
"not_using_index"
to "log_slow_filter"
set implicit log_queries_not_using_indexes = 1.
to reproduce:
set SESSION log_queries_not_using_indexes = 0; |
SHOW VARIABLES LIKE 'log_q%'; |
set SESSION log_slow_filter = "admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,not_using_index,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk "; |
SHOW VARIABLES LIKE 'log_q%'; |
For "log_queries_not_using_indexes", it is documented,
that query time is not important.
Queries that don't use an index, or that perform a full index scan where the index doesn't limit the number of rows, will be logged to the slow query log (regardless of time taken). |
But "not_using_index," as a "log_slow_filter" option should respect "long_query_time".
Attachments
Issue Links
- relates to
-
MDEV-11165 Documentation about log_slow_filter unclear
- Closed