← All Articles
Online MySQL Migrations with Dual-Write Cutovers
A tested migration sequence for large MySQL tables using shadow schema, dual writes, checksums, and rollback-safe traffic switching.
18 min read
Schema migrations on multi-terabyte datasets are operational programs, not single SQL statements.
Safe Sequence
- Shadow table creation.
- Backfill in bounded chunks.
- Enable dual-write.
- Validate checksums continuously.
- Gradual read cutover, then write cutover.
INSERT INTO users_v2 (id, email)
SELECT id, email FROM users
WHERE id > ? AND id <= ?;No cutover without sustained zero drift.


