Optimizing MySQL Table
Table structure optimization has to do with reclaiming unused space after deletions and basically cleaning up the table after structural modifications have been made. The OPTIMIZE SQL command takes care of this, using the following syntax:
OPTIMIZE TABLE table_name[,table_name]
Here is an example of optimizing table with name "ibf_mlite_played"
mysql> optimize table ibf_mlite_played;
+---------------------------+----------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------------------------+----------+----------+----------+
| invision.ibf_mlite_played | optimize | status | OK |
+---------------------------+----------+----------+----------+
1 row in set (0.24 sec)
mysql>
Back to MySQL Tips
|