:: DEVELOPER ZONE
To coalesce fragmented records and eliminate wasted space resulting from deleting or updating records, run myisamchk in recovery mode:
shell> myisamchk -r tbl_name
You can optimize a table in the same way by using the SQL
OPTIMIZE TABLE statement. OPTIMIZE
TABLE does a repair of the table and a key analysis, and
also sorts the index tree to give faster key lookups. There is also
no possibility of unwanted interaction between a utility and the
server, because the server does all the work when you use
OPTIMIZE TABLE. See
Section 13.5.2.5, “OPTIMIZE TABLE Syntax”.
myisamchk also has a number of other options you can use to improve the performance of a table:
-S, --sort-index
-R ,
index_num--sort-records=
index_num
-a, --analyze
For a full description of the options, see Section 5.8.3.1, “myisamchk Invocation Syntax”.
© 1995-2005 MySQL AB. All rights reserved.

User Comments
Warning: query failed: Unknown column 'user.firstname' in 'field list' in /data0/sites/live/web-main/lib/mysql-cxn.php on line 69
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data0/sites/live/web-main/lib/docbook.php on line 245
Add your own comment.