You can set the verbosity of what's logged to the slow query log by setting the the log_slow_verbosity variable to a combination of the following values:
Query_plan
explain
(Starting from 10.0.5) Innodb
The default value is ' ', to be compatible with MySQL 5.1.
Multiple options are separated by ','.
log_slow_verbosity is not supported when log_output='TABLE'.
You can define which queries to log to the slow query log by setting the variable log_slow_filter to a combination of the following values:
admin
filesort
filesort_on_disk
full_join
full_scan
query_cache
query_cache_miss
tmp_table
tmp_table_on_disk
Multiple options are separated by ','. If you don't specify any options everything will be logged.
The log_slow_rate_limit variable limits logging to the slow query log by not logging every query (only one query / log_slow_rate_limit is logged). This is mostly useful when debugging and you get too much information to the slow query log.
Note that in any case, only queries that takes longer than log_slow_time or long_query_time' are logged (as before).
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/slow-query-log-extended-statistics/