real crude and fast description coming smile

As your MySQL database grows in size it, of course, grows in size. When you delete things from it though, it doesn't give up that space.

Better put, let's say you have 50k rows in a table. And you delete one right out of the middle. MySQL doesn't rewrite all the rows after that one to make better use of the space. That would take toooo long. So after a lot of use you end up with empty places all of the place.

Optimization dumps out all the data into a new table. The new table has no empty space. Once it verifies the new table it deleted the old and replaces it with the new table.

Think of it similar to defragmenting a hard drive. It's just more efficient.

There really is a lot more to it than than and you should read the docs at mysql.com for a better idea.

Do you need to do it often? Only if you do a lot of deletions.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]