Oracle 5.0 Reference Manual page 658

Table of Contents

Advertisement

--sort-index
use indexes faster.
--sort-records=index_num
This makes your data much more localized and may speed up range-based
operations that use this index.
For a full description of all available options, see
Maintenance
7.6.5. Setting Up a
It is a good idea to perform table checks on a regular basis rather than waiting for problems to
occur. One way to check and repair
statements. See
Another way to check tables is to use myisamchk. For maintenance purposes, you can use
myisamchk
printing messages only when errors occur.
It is also a good idea to enable automatic
has done a restart in the middle of an update, you usually need to check each table that could have
been affected before it is used further. (These are "expected crashed tables.") To cause the server
to check
MyISAM
Section 5.1.3, "Server Command
You should also check your tables regularly during normal system operation. For example, you can run
a
job to check important tables once a week, using a line like this in a
cron
35 0 * * 0
This prints out information about crashed tables so that you can examine and repair them as
necessary.
To start with, execute
24 hours. As you see that problems occur infrequently, you can back off the checking frequency to
once a week or so.
Normally, MySQL tables need little maintenance. If you are performing many updates to
with dynamic-sized rows (tables with VARCHAR, BLOB, or
deleted rows you may want to defragment/reclaim space from the tables from time to time. You can do
this by using
server for a while, change location into the data directory and use this command while the server is
stopped:
shell>
myisamchk -r -s --sort-index --sort_buffer_size=16M */*.MYI
Setting Up a
MyISAM
[326]
or -S: Sort the index blocks. This optimizes seeks and makes table scans that
Utility".
Table Maintenance Schedule
MyISAM
Section 13.7.2, "Table Maintenance
-s. The
option (short for
-s
tables automatically, start it with the
Options".
/path/to/myisamchk
--fast --silent /path/to/datadir/*/*.MYI
myisamchk -s
on the tables in question. Alternatively, if you can stop the
OPTIMIZE TABLE
Table Maintenance Schedule
[326]
or
index_num: Sort data rows according to a given index.
-R
Section 4.6.3,
tables is with the
MyISAM
Statements".
[321]) causes
--silent
table checking. For example, whenever the machine
MyISAM
--myisam-recover
each night on all tables that have been updated during the last
TEXT
638
SELECT
"myisamchk
— MyISAM Table-
and
CHECK TABLE
REPAIR TABLE
to run in silent mode,
myisamchk
[415]
option. See
crontab
columns) or have tables with many
and
ORDER BY
file:
tables
MyISAM
mysqld

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents