3 ms·
To MySQL gurus: how to get InnoDB to release space?
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?
- raquo 18y agoDo 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 18y agoDELETE would take I think like a day, so I do a DROP.
- stonemetal 18y agoRTFM 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 http://bugs.mysql.com/bug.php?id=1341 interesting.
- bemmu 18y agoThanks, wow need to recreate whole database.