Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Nov 032010
 

Optimize table in MySQL

Answer:

OPTIMIZE TABLE command is useful to defragment the database tables. It is particularly useful when you have deleted a large portion of a table or if you have made massive changes to a table with variable-length rows.

To do so, execute the following statement

mysql> OPTIMIZE TABLE my_table;

That's all.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>