It has been so long since I used MySQL (and that’s for the better).

Does MySQL still break when running ALTER TABLE on a huge table?

One thing I don’t like about MySQL is that it has too many foot gun.

Online schema change solutions have been around for over the past decade and are commonly used to ALTER TABLE with no downtime (or with minimal interruption) on the largest deployments of MySQL today.

The two most common solutions are pt-online-schema-change and gh-ost, and if you are running MySQL today and still running direct ALTER TABLE suffering outage, then you're in for a pleasant change.

On top of that, most MySQL ALTER TABLE operations with InnoDB tables support non-blocking, lockless operation as well. My main concern with these is that they're still replicated sequentially leading to replication lags.

MySQL is also slowly adding "Instant DDL", currently still limited to just a few types of changes.

Disclosure: I authored gh-ost (at GitHub), oak-online-alter-table (the original schema change tool) and am a maintainer for Vitess and working on online schema changes in Vitess.

Links:

- https://www.percona.com/doc/percona-toolkit/3.0/pt-online-sc...

- https://github.com/github/gh-ost

- Past HN discussion: https://news.ycombinator.com/item?id=16982986

- https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl-op...

- https://vitess.io/docs/user-guides/schema-changes/

Edited for formatting.