ANALYZE Statement
Learn to use the ANALYZE statement to execute a query and produce a performance report. This command reveals how close the optimizer's plan was to the actual execution.
Description
ANALYZE explainable_statement;Command Output
ANALYZE SELECT * FROM tbl1
WHERE key1
BETWEEN 10 AND 200 AND
col1 LIKE 'foo%'\G*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: tbl1
type: range
possible_keys: key1
key: key1
key_len: 5
ref: NULL
rows: 181
r_rows: 181
filtered: 100.00
r_filtered: 10.50
Extra: Using index condition; Using whereInterpreting the Output
Joins
Meaning of NULL in r_rows and r_filtered
ANALYZE FORMAT=JSON
Notes
See Also
Last updated
Was this helpful?

