A discussion on applying DDLs using a temp table pattern to allow for non blocking updates to the database. Includes a demonstration of the gem mysql_big_table_migration
Musings from a Southern software developer
A discussion on applying DDLs using a temp table pattern to allow for non blocking updates to the database. Includes a demonstration of the gem mysql_big_table_migration
Interesting! I’ve never used this gem, although I have used lhm (https://github.com/soundcloud/lhm) which seems to work very well on large tables with zero downtime. I like that lhm requires very little changes to the way you normally do migrations, and under the covers does a copy to a new table with triggers, and then drops and renames similar to the approach outlined above.
One other thing that you probably know is that although MySQL 5.6 does not support online schema migration for InnoDB, it does support online index creation in most cases, which is nice.
LikeLike