I'm a PHP developer so don't be strict. I have a big table ~5.5gb dump. Our PM decided to make new column in it to perform new feature. Table is InnoDB so what i tried:
Alter table in screen with table lock. Took ~30hours and nothing. So I just stopped it. First I made a mistake because I didn't end all transactions but the 2nd time was no multilock. Status was
copy to tmp table.
Since I also need to apply partitioning for this table we decide to make dump, rename and make table with same name and new structure. But dump is making strict copy(at least I didn't found something else). So i added to dump a new column with
sedand query it. But some strange errors began. I believe it was caused by charset. Table in utf-8 and file became us-ascii after
sed. So I got errors(unknown command '\'') on 30% of data. So this is also a bad way.
What are other options to accomplish this and speed performance(I can do it with php script, but it will took ages). What will be performance of
INSERT SELECT in this case.
Thanks for any advance.