I assume you are talking about Overhead as phpMyAdmin reports it? (Which is a bad name for it imo.) If you aren't, then just ignore me. When you DELETE from a MyISAM table, or run an UPDATE on a variable length MyISAM row which gets shorter, then you get 'extra' space inside of the datafile. When you next do an INSERT, MySQL will automatically reuse the space. This prevents MySQL from having to constantly making the datafile larger and smaller, which is a very good thing for speed. Generally this little "overhead" as phpMyAdmin calls it isn't bad at all and is perfectly normal for tables with a lot of DELETEs and UPDATEs. It is only when you DELETE a large portion of the table or have been running a large amount of UPDATEs on variable width columns that this gets to be an issue. That is when you can run OPTIMIZE TABLE, which will reclaim the disk space and defragment your table along with doing a couple of other good things. I hope that helps explain this Overhead, which really should be called Empty Space in phpMyAdmin.
(This reply stolen from another board - not my info. :) |