My team has a trauma date everyone knows about (I wasn't here yet that day, but the story is etched into the company's memory): two years ago, one Tuesday at noon, an innocent-looking ALTER TABLE was run on the orders table. A metadata lock chain formed, writes sat in a queue for four minutes, and in those four minutes not a single order was created on the platform. Four minutes at peak time means thousands of orders. Ever since, the phrase "we're just going to add a small column" sets off alarm bells for us by reflex. Last month we had to touch the same table again: orders is now 1.4 billion rows and 780 GB, and the redesign of the cancellation flow required a new column plus an index on top of it. This time the operation took 31 hours and nobody noticed. That nobody noticed was the result of a discipline that took months to build.
Trusting the Word INSTANT Too Much
The first wrong hypothesis came from inside the team: "We're on MySQL 8, we'll say ALGORITHM=INSTANT, it'll take seconds." On paper that's right; adding a column falls under instant DDL in most cases. But our change set wasn't just a column: there was a secondary index on top of the column and a type widening on another column, and both fall outside instant's scope and require a table-copying rebuild. On top of that, instant column addition has its own limits: row format restrictions, a version threshold and a cap on the number of columns added instantly to a table. We tried it on an exact copy in staging; INSTANT was rejected, and INPLACE, despite looking online, was ruled out because it would flow to the replica as one giant transaction and produce hours of replication lag. Replica lag isn't an abstract metric for us: reporting, the search feed and some reads are served from replicas. Lesson one: the online DDL decision comes from a rehearsal on a production copy, not from the docs.
And by rehearsal I don't mean a casual test. We spin up a copy from the nightly snapshot on the same disk and instance type as production, and replay a recorded slice of real write traffic on top of it via binlog replay so the table doesn't sit idle during the migration. In this setup we measured three things: copy speed by chunk size, binlog apply latency under write traffic and estimated total duration. In the first run we started with 1,000-row chunks; it left IO comfortable, but the total duration exceeded 50 hours. When we went up to 2,500, replica lag wobbled dangerously. We settled on 1,500, and the actual duration in production deviated from the rehearsal's estimate by only 8%. That 8% accuracy is the same thing as not sweating "what if" at 04:00 in the morning.

The Ghost Listening to the Binlog
We chose gh-ost. Our historical issue with pt-online-schema-change is triggers: pt-osc attaches three triggers to the original table and adds a synchronous cost to every write; on a write-heavy orders table, that cost is paid at the worst possible moment, at peak traffic. gh-ost, on the other hand, reads changes from the binlog, that is, asynchronously; it attaches nothing to the table itself. Load control is in the driver's seat, too: we set max-lag-millis to 1,500 and also defined a throttle flag via our own marker table. During the evening order peak between 18:00 and 23:00 and over the lunch hour, copying paused automatically; overnight it advanced chunk by chunk. Copying 1.4 billion rows to the ghost table, including these pauses, took 29 hours; live changes from the binlog were applied to the ghost table concurrently.

We dodged one gotcha cheaply: disk. The ghost table is a full copy of the original; for a 780 GB table you need at least that much free space for the duration of the operation, not counting binlog growth. The volume was 58% full; before the operation we archived old partitions and brought it down to 41%. Had we not, we would have had to roll everything back at hour 25 because of a disk alert, and while rolling back is easy with gh-ost, 25 hours would have gone in the trash.
Two more details of how gh-ost works shaped the operation. The first is binlog format: row-based (ROW) binlog is mandatory, and we were already in that mode for replication; if you aren't, that's a separate migration project in itself, not something to discover on migration morning. Second, we wired gh-ost to read the binlog from a replica instead of the master; the only load on the master was the chunk-copy writes, and the cost of listening to the change stream moved to the replica. On the monitoring side, we opened a Grafana dashboard dedicated to the migration: rows copied, estimated time remaining, binlog lag, throttle status. For 31 hours, everyone watching that dashboard had their finger on the operation's pulse; we didn't ask "what's the status?" in Slack even once.
The Moment of Cut-Over
The tensest part is the cut-over: the atomic rename where the ghost table takes over the original's name. The beauty of gh-ost is that you choose this moment: with the postpone flag we kept the operation waiting in a ready state and triggered it during a low-traffic window. At 04:10 in the morning the cut-over completed with a 2.3-second write pause; on the application side this showed up as a brief latency spike that a few hundred requests made up for with retries. There was one more safety step before the cut-over: a verification script doing sampled row comparison between the ghost table and the original matched 100 thousand randomly selected rows column by column and found not a single difference; had it found one, the cut-over would have been called off that night. Unless you zoom into that moment on the order creation graph in Grafana, you won't see anything. Next to the four-minute flat line from two years earlier, those 2.3 seconds felt like a victory to us.
A Schema Change Is a Deployment
The real transformation wasn't in the tool but in the process. We now treat schema changes like code: every change is a migration PR, with at least two reviews, a mandatory rehearsal on the staging copy and an estimated duration/disk report. On the application side, the expand-contract pattern is mandatory: first the new column is added and the code is made to work with both schemas, dual writes are switched on, historical data is filled in with a batch backfill via Kafka, reads are moved to the new column, and only weeks later is the old column retired in a separate operation. The rollback plan isn't "undo the ALTER"; because the code works with both schemas, rollback is usually just turning off a feature flag.

The backfill deserves its own story, because right where people think "we added the column, done," half the work begins. Running a single giant UPDATE to fill the new column with historical data means a lock and replication storm as dangerous as the ALTER. We ran the backfill through Kafka: a producer job wrote the keys of old records to a topic in batches of 5,000, consumers updated each batch with short transactions and slowed themselves down whenever replica lag exceeded 1 second. At this pace, the backfill of 1.4 billion rows was spread over four days; not rushing was a design choice here. An operation nobody notices for four days is always faster than one everybody notices in four minutes.
Let me also share what we measured: throughout this entire operation, the order creation success rate never dropped below 99.99%, replica lag never exceeded 1.5 seconds, and not a single customer-facing incident was opened. Not a bad score for 31 hours of open-heart surgery. If you need to touch your big table and you're carrying our Tuesday-noon fear from two years ago, write to us here; I'd be glad to share our rehearsal checklist. Fear won't save you, but rehearsal will.