How to optimize a 9 GB table if there is very little free disk space?

I have a 9 GB myisam table on a 12 GB disk with 5 MB of free space. How to optimize table?

The problem is that optimize works by copying the entire table to a new file, so for this I need 9 GB of free space.

The only solution I can come up with is

  • stop the entry in the table,
  • Logically back up the table to another machine.
  • delete table
  • recreate the table by restoring it from a backup on another computer.

And in the future I have to limit the size of the table to less than the available free space.

Am I answering my question or is there a better solution? Thanks.

+4
source share
1 answer

Drop indexes and restore them manually or on demand. This also applies to the OPTIMIZE operation.

0
source

Source: https://habr.com/ru/post/1391091/


All Articles