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.
To view a visual explain execution plan, execute your query from the SQL editor and then select Execution Plan within the query results tab. The execution plan defaults to Visual Explain , but it also includes a Tabular Explain view that is similar to what you see when executing EXPLAIN in the MySQL client.
It tells you the execution plan. It doesn't execute the query (although it might execute subqueries).
The filtered column indicates an estimated percentage of table rows that will be filtered by the table condition. That is, rows shows the estimated number of rows examined and rows × filtered / 100 shows the number of rows that will be joined with previous tables.
As you can see in the docs https://mariadb.com/kb/en/explain-analyze/
The syntax for the
EXPLAIN ANALYZE
feature was changed toANALYZE
statement, available since MariaDB 10.1.0. SeeANALYZE
statement.
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 deprecated EXPLAIN ANALYZE
.
The
ANALYZE
statement is similar to theEXPLAIN
statement.ANALYZE
statement will invoke the optimizer, execute the statement, and then produceEXPLAIN
output instead of the result set. TheEXPLAIN
output will be annotated with statistics from statement execution.The syntax is
ANALYZE explainable_statement;
where the statement is any statement for which one can run EXPLAIN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With