

To MySQL gurus: how to get InnoDB to release space? - bemmu

A few times I've let an InnoDB table grow so much that it takes all available disk space. Then in a panic I will drop the table and re-create it (the data in it is not that important). However InnoDB will not release the actual space on the disk, rather it will just mark it as available and continue to use it for future data. Fast perhaps, but not that cool when you have less than 1MB free on your disk. Any way to tell it to REALLY release free space?
======
stonemetal
RTFM

13.2.5. Adding, Removing, or Resizing InnoDB Data and Log Files

You may also find the discussion in <http://bugs.mysql.com/bug.php?id=1341>
interesting.

~~~
bemmu
Thanks, wow need to recreate whole database.

------
raquo
Do you really DROP or TRUNCATE the table, or do you DELETE all rows? Doing the
latter could be the problem as far as I know. You may also want to search for
'purge process' somewhere in mysql/innodb docs.

~~~
bemmu
DELETE would take I think like a day, so I do a DROP.

