PDA

View Full Version : what does OPTIMIZE do


GO ILLINI
11-25-2007, 04:00 AM
I use phpMyAdmin and constantly see the OPTIMIZE TABLE option on the structure page with a number of bytes highlighted. You press the button and the bytes are gone! Great!!!

But what exactly did that just delete? Should you optimize or just leave the databases as they are? Is there a chance of corrupting the data in a table when you run this?

-Adam

Fumigator
11-25-2007, 11:19 AM
Optimize is kind of like defrag for your tables.

More info in the manual:

http://dev.mysql.com/doc/refman/4.1/en/optimize-table.html