Check Table checks a table or tables for errors. Currently, MySQL supports checking only for MyISAM, InnoDB and ARCHIVE tables. For MyISAM tables, the key statistics are updated as well.
Hint: Just simply right-click the table and select Maintain Tables -> Check Tables.Check Table returns a result set with the following columns:
Column |
Value |
Table | The table name. |
Op | Always check. |
Msg_type | One of status, error, info, or warning. |
Msg_text | The message. |
You might get many rows of information for each checked table. The last row has a Msg_type value of status and the Msg_text normally should be OK. If you do not get OK, or Table is already up to date you should normally run a repair of the table. Table is already up to date means that the storage engine for the table indicated that there was no need to check the table.
The other check options that can be given are shown in the following table:
Type |
Meaning |
QUICK | Don't scan the rows to check for wrong links. |
FAST | Don't scan the rows to check for wrong links. |
CHANGED | Only check tables which have been changed since last check or haven't been closed properly. |
EXTENDED | Do a full key lookup for all keys for each row. This ensures that the table is 100 % consistent, but will take a long time! |
Related topics:
Analyze Tables
Optimize Tables
Repair Tables