I've just ran into a situation that I've never encountered before, and was hoping someone might give me some insight.
I have a server with 29 GB of disk space, and a database with 6.2 GB of data in it (6.1 gigs of the data is in a single table) that is currently using 22 GB of space. I need to perform an OPTIMIZE TABLE command on the offending table to return unused disk space.
The MySQL documentation has a comment in it that warns that this command needs at least [database + data of biggest table] storage space remaining to perform the optimization. In my case, that is 22GB + 22GB, which is much greater than the disk space available.
Is this accurate? Is my only alternative to back up the database, and optimize it on another machine, then re-create the database and restore from the backup?
Dan