Trying to enable slow_query with verbosity enabled with different options in Mariadb 10.6.*.
But unable to set option- explain for log-slow-verbosity in mysql session
https://mariadb.com/kb/en/explain-in-the-slow-query-log/
while we can set other options as query_plan and innoDB in mysql session
> set log_slow_verbosity=explain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'explain' at line 1
> set log_slow_verbosity=query_plan;
Query OK, 0 rows affected (0.009 sec)
> set log_slow_verbosity=innodb;
Query OK, 0 rows affected (0.038 sec)
> show variables like '%slow%';
+------------------------------+------------------------------------+
| Variable_name | Value |
+------------------------------+------------------------------------+
| ::: | |
| log_slow_verbosity | query_plan
| slow_query_log | ON
| slow_query_log_file | /var/opt/na/log/mysql-1/slow-query.log
+------------------------------+------------------------------------+
And while the same is working fine when we set this variable as part of my.cnf file
> cat /etc/na/my-1.cnf | grep log-slow
log-slow-verbosity=query_plan,explain
> show variables like '%log_slow%';
+------------------------------+------------------------------------+
| Variable_name | Value |
+------------------------------+------------------------------------+
| log_slow_verbosity | query_plan,explain |
+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
6 rows in set (0.001 sec)
Is this option not supported in 10.6 which is not mentioned in the docs or am i missing anything
https://mariadb.com/kb/en/slow-query-log-extended-statistics/
Asked by ragul rangarajan
(111 rep)
Jan 20, 2023, 01:32 PM
Last activity: Feb 15, 2023, 07:23 AM
Last activity: Feb 15, 2023, 07:23 AM