(mysql.info) analyze-table
Info Catalog
(mysql.info) table-maintenance-sql
(mysql.info) table-maintenance-sql
(mysql.info) backup-table
13.5.2.1 `ANALYZE TABLE' Syntax
...............................
ANALYZE [LOCAL | NO_WRITE_TO_BINLOG] 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. This
statement works with `MyISAM', `BDB', and `InnoDB' tables. For `MyISAM'
tables, this statement is equivalent to using `myisamchk -a'.
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.
`ANALYZE TABLE' returns a result set with the following columns:
*Column* *Value*
`Table' The table name
`Op' Always `analyze'
`Msg_type' One of `status', `error', `info', or
`warning'
`Msg_text' The message
You can check the stored key distribution with the `SHOW INDEX'
statement. See show-index.
If the table has not changed since the last `ANALYZE TABLE' statement,
the table is not analyzed again.
`ANALYZE TABLE' statements are written to the binary log unless the
optional `NO_WRITE_TO_BINLOG' keyword (or its alias `LOCAL') is used.
This is done so that `ANALYZE TABLE' statements used on a MySQL server
acting as a replication master will be replicated by default to the
replication slave.
Info Catalog
(mysql.info) table-maintenance-sql
(mysql.info) table-maintenance-sql
(mysql.info) backup-table
automatically generated byinfo2html