Besides having mariadb 10.1.36-MariaDB I get following error.
EXPLAIN ANALYZE select 1
MySQL said: Documentation
1064 - 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 'ANALYZE select 1' at line 1
What additional I need to do here. My PHP version is 7.2.11.
2
Answers
As you can see in the docs https://mariadb.com/kb/en/explain-analyze/
So just use
ANALYZE ...
without the explain keyword and you’ll get the same output you got in the past.In the analyze docs you have the info for the
ANALYZE
statement, you can see it’s the same that the deprecatedEXPLAIN ANALYZE
.This is a bug in mysql older versions(5), can be resolved by upgrading to mysql version 8.
see official discussion https://bugs.mysql.com/bug.php?id=97416