Jump to content


This topic is now archived and is closed to further replies.



Recommended Posts

Occasionally, when I optimize a table, I cannot even access the table anymore, and I need to delete it, because it doesn\'t work. Can someone tell me why this happens?

Share this post

Link to post
Share on other sites

Have you read these


OPTIMIZE TABLE should be used if you have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB, or TEXT columns).  Deleted records are maintained in a linked list and subsequent INSERT operations reuse old record positions. You can use OPTIMIZE TABLE to reclaim the unused space and to defragment the datafile.


OPTIMIZE TABLE works the following way:  


·If the table has deleted or split rows, repair the table.

·If the index pages are not sorted, sort them.

·If the statistics are not up to date (and the repair couldn\'t be done by sorting the index), update them.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.