Search code examples
mysqloptimizationspacediskpartition

Disk usage for optimizing a partitioned MySQL-Table


I have a large MyISAM table with 3 million rows that has a size of 31 GB due to a 10KB blob in each row. The table has already 30 partitions. I want to optimize the table since I am going to remove rows with some old data and resize the blobs. My question is about the disk usage while optimzing:

If I do an optimize of the whole table, does MySQL steps through the partitions and optimize only one partionen at a time and thus only need extra space of one small partion? Or do I have to optimize a or few partitions in order not to have so much extra disk space while optimizing.


Solution

  • Optimizing only a partition with s size of ~1 GB takes only very fews seconds and I could not see any heavy disk usage.