Skip to content

ANALYZE

ANALYZE TABLE employees;
+----------------+---------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------------+---------+----------+----------+
| company.employees | analyze | status | OK |
+----------------+---------+----------+----------+

The ANALYZE TABLE statement collects and stores the distribution of key values for a table. It can be used to improve join operations of columns referenced constantly in queries. In this example, we analyzed the table employees and the output shows the operation was successful.