(mysql.info.gz) Table maintenance
Info Catalog
(mysql.info.gz) Backup strategy example
(mysql.info.gz) Disaster Prevention
(mysql.info.gz) Maintenance schedule
5.7.3 Table Maintenance and Crash Recovery
------------------------------------------
The following text discusses how to use `myisamchk' to check or repair
`MyISAM' tables (tables with `.MYI' and `.MYD' files). The same
concepts apply to using `isamchk' to check or repair `ISAM' tables
(tables with `.ISM' and `.ISD' files). Storage engines.
You can use the `myisamchk' utility to get information about your
database tables or to check, repair, or optimize them. The following
sections describe how to invoke `myisamchk' (including a description of
its options), how to set up a table maintenance schedule, and how to
use `myisamchk' to perform its various functions.
Even though table repair with `myisamchk' is quite secure, it's 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, read the instructions in
`myisamchk' general options 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 were introduced in different versions, but all are
DONTPRINTYET available from MySQL 3.23.14 on. See `ANALYZE TABLE' ANALYZE
TABLE, `CHECK TABLE' CHECK TABLE, *Note `OPTIMIZE TABLE':
DONTPRINTYET available from MySQL 3.23.14 on. See `ANALYZE TABLE' ANALYZE
TABLE, `CHECK TABLE' CHECK TABLE, `OPTIMIZE TABLE'
OPTIMIZE TABLE, and `REPAIR TABLE' REPAIR TABLE. The statements
can be used directly, or by means of the `mysqlcheck' client program,
which provides a command-line interface to them.
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. Otherwise, there can be
unwanted interaction between `myisamchk' and the server.
Menu
* myisamchk syntax `myisamchk' Invocation Syntax
* myisamchk general options General Options for `myisamchk'
* myisamchk check options Check Options for `myisamchk'
* myisamchk repair options Repair Options for `myisamchk'
* myisamchk other options Other Options for `myisamchk'
* myisamchk memory `myisamchk' Memory Usage
* Crash recovery Using `myisamchk' for Crash Recovery
* Check How to Check `MyISAM' Tables for Errors
* Repair How to Repair Tables
* Optimization Table Optimization
Info Catalog
(mysql.info.gz) Backup strategy example
(mysql.info.gz) Disaster Prevention
(mysql.info.gz) Maintenance schedule
automatically generated byinfo2html