Syntax:
ANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE
    tbl_name [, tbl_name] ...

ANALYZE TABLE analyzes and stores the key distribution for a table.
During the analysis, the table is locked with a read lock for InnoDB
and MyISAM. This statement works with InnoDB, NDB, and MyISAM tables.
For MyISAM tables, this statement is equivalent to using myisamchk
--analyze. This statement does not work with views.

For more information on how the analysis works within InnoDB, see
http://dev.mysql.com/doc/refman/5.5/en/innodb-statistics-estimation.htm
l. Also see
http://dev.mysql.com/doc/refman/5.5/en/innodb-analyze-table-complexity.
html and
http://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.

MySQL uses the stored key distribution to decide the order in which
tables should be joined when you perform a join on something other than
a constant. In addition, key distributions can be used when deciding
which indexes to use for a specific table within a query.

This statement requires SELECT and INSERT privileges for the table.

ANALYZE TABLE is supported for partitioned tables, and you can use
ALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;
for more information, see [HELP ALTER TABLE], and
http://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.

URL: http://dev.mysql.com/doc/refman/5.5/en/analyze-table.html

