GNU Info

Info Node: (mysql.info)Table maintenance

(mysql.info)Table maintenance


Next: Maintenance regimen Prev: REPAIR TABLE Up: Disaster Prevention
Enter node , (file) or (file)node

Using `myisamchk' for Table Maintenance and Crash Recovery
----------------------------------------------------------

Starting with MySQL Version 3.23.13, you can check MyISAM tables with
the `CHECK TABLE' command. Note: CHECK TABLE.  You can repair tables
with the `REPAIR TABLE' command. Note: REPAIR TABLE.

To check/repair MyISAM tables (`.MYI' and `.MYD') you should use the
`myisamchk' utility. To check/repair ISAM tables (`.ISM' and `.ISD')
you should use the `isamchk' utility. Note: Table types.

In the following text we will talk about `myisamchk', but everything
also applies to the old `isamchk'.

You can use the `myisamchk' utility to get information about your
database tables, check and repair them, 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.

You can, in most cases, also use the command `OPTIMIZE TABLES' to
optimize and repair tables, but this is not as fast or reliable (in case
of real fatal errors) as `myisamchk'.  On the other hand, `OPTIMIZE
TABLE' is easier to use and you don't have to worry about flushing
tables.  Note: `OPTIMIZE TABLE'.

Even that the repair in `myisamchk' is quite secure, it's always a good
idea to make a backup BEFORE doing a repair (or anything that could
make a lot of changes to a table)

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 Tables for Errors
Repair
How to Repair Tables
Optimization
Table Optimization

automatically generated by info2www version 1.2.2.9