Altering table on HUGE table MYSQL

时间:2019-05-31 11:33:41

标签: mysql

I have seen a few different answers on this question. But all of them seemed to be stuff as "don't worry, on 2M rows, it will take 2minutes...".

I want to add a column to a table containing over 120 millions rows. Last time I tried something like this, it locked my table, filled up the RAM memory and took about 3 hours before I killed the command.

What would be the best solution for this column add ? I heard about making a copy of the table into a new one (the issue here is that if I "Insert into a select * FROM b" all the 120M rows, will it not Fill up the RAM ?)

Thank you again.

0 个答案:

没有答案