GNU Info

Info Node: (mysql.info)Optimization

(mysql.info)Optimization


Prev: Repair Up: Table maintenance
Enter node , (file) or (file)node

Table Optimization
..................

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 using the SQL `OPTIMIZE TABLE'
statement.  `OPTIMIZE TABLE' does a repair of the table, a key analyzes
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'. Note: OPTIMIZE TABLE.

`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 option. Note: myisamchk syntax.


automatically generated by info2www version 1.2.2.9