(mysql.info) table-maintenance
Info Catalog
(mysql.info) point-in-time-recovery
(mysql.info) disaster-prevention
5.10.4 Table Maintenance and Crash Recovery
-------------------------------------------
Menu
* crash-recovery Using `myisamchk' for Crash Recovery
* check How to Check `MyISAM' Tables for Errors
* repair How to Repair Tables
* table-optimization Table Optimization
* table-info Getting Information About a Table
* maintenance-schedule Setting Up a Table Maintenance Schedule
This section discusses how to use `myisamchk' to check or repair
`MyISAM' tables (tables that have `.MYD' and `.MYI' files for storing
data and indexes). For general `myisamchk' background, see
myisamchk.
You can use `myisamchk' to get information about your database tables
or to check, repair, or optimize them. The following sections describe
how to perform these operations and how to set up a table maintenance
schedule.
Even though table repair with `myisamchk' is quite secure, it is always
a good idea to make a backup _before_ doing a repair or any maintenance
operation that could make a lot of changes to a table
`myisamchk' operations that affect indexes can cause `FULLTEXT' indexes
to be rebuilt with full-text parameters that are incompatible with the
values used by the MySQL server. To avoid this problem, follow the
guidelines in myisamchk-general-options.
In many cases, you may find it simpler to do `MyISAM' table maintenance
using the SQL statements that perform operations that `myisamchk' can
do:
* To check or repair `MyISAM' tables, use `CHECK TABLE' or `REPAIR
TABLE'.
* To optimize `MyISAM' tables, use `OPTIMIZE TABLE'.
* To analyze `MyISAM' tables, use `ANALYZE TABLE'.
These statements can be used directly or by means of the `mysqlcheck'
client program. One advantage of these statements over `myisamchk' is
that the server does all the work. With `myisamchk', you must make sure
that the server does not use the tables at the same time so that there
is no unwanted interaction between `myisamchk' and the server. See
analyze-table, check-table, optimize-table, and
repair-table.
Info Catalog
(mysql.info) point-in-time-recovery
(mysql.info) disaster-prevention
automatically generated byinfo2html