Adding a column to a tens‑of‑millions‑row MySQL table may look trivial, but the real difficulty lies in the metadata‑lock timing and online traffic impact, requiring careful DDL type selection, pre‑flight checks, and often an online migration tool such as gh‑ost to avoid business‑level outages.
This guide explains MySQL DDL mechanisms, compares COPY, INPLACE, and INSTANT algorithms across versions, details Online DDL execution phases and risks, and provides practical production‑grade indexing practices and interview Q&A for handling large tables without blocking reads or writes.
The article explains MySQL 8.0's INSTANT DDL algorithm, its default behavior, limitations such as the 64‑change cap, and provides practical recommendations for always specifying the algorithm, monitoring instant changes via INFORMATION_SCHEMA, and safely rebuilding tables when needed.
This article reviews Tencent Cloud’s self‑developed MySQL kernel TXSQL, detailing its enterprise‑grade features, evolutionary roadmap, overall and cloud‑native TDSQL‑C architecture, columnar engine for OLAP, instant DDL capabilities, high‑availability mechanisms, performance optimizations, and the rigorous development and release process that underpins its stability.
The article explains how MySQL 8.0 introduced the instant algorithm for adding columns, compares it with older copy and inplace‑rebuild methods, shows usage examples, performance test results, and outlines the restrictions and version differences of this fast DDL operation.