Mysql – How much disk space does innodb need to ALTER TABLE

innodbMySQLsql

I have a large InnoDB table that I want to alter by adding a small column to. I'm prepared to wait a while, but I'm wondering how much disk space will the ALTER TABLE command consume while it's running? Will I need enough room on my disk for two full copies of the table?

Best Answer

Yes. You will need enough space for two copies of the table. MySQL performs alterations of tables by creating a new table, copying data from the old, and then deleting the old table.