Help Tables, columns and indexes

Table diagnostics

The Table Diagnostics window runs the server’s table maintenance statements (CHECK TABLE, ANALYZE TABLE, OPTIMIZE TABLE and REPAIR TABLE) on one or more tables of a database, and shows the server’s report.

The Table Diagnostics dialog

Opening it

Choose Tools > Table Diagnostics… or press Ctrl+Alt+T. Press F1 in the window for this page.

Choosing the tables

ControlWhat it does
Select database and table(s)The database, from those shown in the Object Browser. It starts on the one selected there, or on the first one.
The table listThe database’s tables, all ticked to begin with. Views are not listed. Untick the tables you want to leave out.
Select/Deselect all table(s)Ticks or unticks every table at once.

The buttons on the right are greyed while no table is ticked. If the database has no tables, the buttons, options and Select/Deselect all table(s) are all greyed.

The four operations

Each button sends one statement for all the ticked tables together.

ButtonOptionbonSQL sends
Optimize…Localoptimize table ...; with Local ticked, optimize NO_WRITE_TO_BINLOG table ...
Check…the list beside itcheck table ... followed by the option chosen: Quick, Fast, Medium, Extended or Changed. None adds nothing.
Analyze…Localanalyze table ...; with Local ticked, analyze LOCAL table ...
Repair…Quick, Extended, Use_Frm, Localrepair table ... with QUICK, EXTENDED and USE_FRM added for each box ticked; Local makes it repair NO_WRITE_TO_BINLOG table ...

Local adds the server’s option for not writing the statement to its binary log (NO_WRITE_TO_BINLOG, of which LOCAL is another spelling).

Which options a server accepts, and what each does, depends on the server and the table’s engine. If the server refuses one, its error is shown and nothing else happens.

The result

When the statement finishes, bonSQL shows the server’s reply, the rows the statement returns for each table, in a Table Diagnostics Information window. Click OK to go back to the diagnostics window and run another operation.

The window remembers the options you chose (the check type and the tick boxes), and its size and position, for next time. Cancel closes it.

Tips