I have a nightly cron job which deletes all rows of a particular table that are older than 30 days. This table sees a lot of churn and varies greatly in its size. After deleting those rows, I also call OPTIMIZE TABLE
which in turn recreates the table since its an InnoDB table.
Occasionally, I run into an issue where the server runs out of disk space because it needs to make a copy of the data in order to recreate the table.
Would switching that particular table to MyISAM whilst keeping the rest of my database as InnoDB be more effective and prevent my server from running out of disk space? Or in other words, would OPTIMIZE TABLE
act more as a trim on that particular table if it was in MyISAM instead of InnoDB?