Skip to main content
InterviewHubPRO
Section Overview
Q48

Question 48 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

96%
MySQL & InnoDB (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Zero-Downtime Schema Migrations: `gh-ost` and `pt-online-schema-change`.

senior LevelmysqlAdvanced Internals

In Simple Words: Even with Online DDL, massive tables (500M+ rows) risk replication lag and metadata lock stalls.

  • Ghost Table Pattern (gh-ost): Creates a shadow table, applies the DDL schema modification, reads changes from the MySQL binary log, backfills historical data in throttled chunks, and performs a microsecond atomic table rename (RENAME TABLE original TO old, ghost TO original).