I need to extend a column in a quite big table (~90M rows). (MySQL 5.1, InnoDB)
It’s a varchar(15) column that needs to be extended to varchar(20).
This column is a part of the primary key.
I did some reading in the mysql documents and it looks like a temporary table will be created for that process and at the end there will be a swap done. So it won’t lock the table.
But how will be the index rebuild look? I assume it will have to be modified or not?
Will it be rebuild ‘on side’ and then swapped, so no major impact?
I’m concerned about the performance once the alteration is made.
Cheers!
nobody seemed to know the answer so I reached out to the MySQL community forum.
Here’s the thread: http://forums.mysql.com/read.php?22,572693,572865#msg-572865
In shortcut:
The index will be re-created during the data copy to the temporary table.
It will be in place during the table swap.