
Reports a table checksum.

If QUICK is specified, the live table checksum is reported if it is
available, or NULL otherwise.  This is very fast.  A live checksum
is enabled by specifying the CHECKSUM=1 table option, currently
supported only for MyISAM tables.
See also : [CREATE TABLE,  , CREATE TABLE].

In EXTENDED mode the whole table is read row by row and the checksum
is calculated. This can be very slow for large tables.

By default, if neither QUICK nor EXTENDED is specified, MySQL
returns a live checksum if the table storage engine supports it and scans
the table otherwise.

CHECKSUM TABLE returns NULL for non-existent tables.
As of MySQL 5.0.3, a warning is generated for this condition.

This statement is implemented in MySQL 4.1.1.


  @subsubsection OPTIMIZE TABLE Syntax




OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ...

OPTIMIZE TABLE should be used if you have deleted a large part of a
table or if you have made many changes to a table with variable-length rows
(tables that have VARCHAR, BLOB, or TEXT columns).
Deleted records are maintained in a linked list and subsequent INSERT
operations reuse old record positions. You can use OPTIMIZE TABLE to
reclaim the unused space and to defragment the data file.
