Table Diagnostics

Use Tools -> Table Diagnostics (Ctrl+Alt+T) to perform various Table Diagnostics operations.


The Analyze Tables Wizard allows you to analyze and store the key distribution for the table. During the analysis the table is locked with a read lock. Currently MySQL supports analyzing only for MyISAM tables and transaction-safe type tables. MySQL uses the stored key distribution to decide in which order tables should be joined when one does a join on something other than a constant.


The Check Tables Wizard allows you to check the database tables on errors. Options that you can use with CHECK operation.

Quick: Don't scan the rows to check for wrong links.

Fast: Only check tables which haven't been closed properly.

Changed: Only check tables which have been changed since last check or haven't been closed properly.

Medium: Scan rows to verify that deleted links are ok. This also calculates a key checksum for the rows and verifies this with a calculated checksum for the keys.

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!


The Repair Option allows you to repair the database tables that may be corrupted. Options that you can use with REPAIR option.

Quick: Do a repair of only the index tree.

Extended: Create the index row by row instead of creating one index at a time with sorting. This may be better than sorting on fixed-length keys if you have long char() keys that compress very good.


The Optimize option 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 optimization to reclaim the unused space and to defragment the data file.

Still need help? Contact Us Contact Us