Adding a new column should be simple. In practice, it often decides whether a system stays fast or slows into failure. Schema changes touch live data, indexes, queries, jobs, and caches. Do it wrong and you face downtime or corrupted records. Do it right and production keeps running without a pause.
The ALTER TABLE command is the starting point. For small tables, an ALTER TABLE ADD COLUMN can finish in seconds. But at scale, where rows number in the hundreds of millions, a blocking alter can lock writes and break SLAs. This is where online schema migration tools matter. gh-ost or pt-online-schema-change let you add columns without blocking traffic, creating a shadow table and swapping it in with minimal disruption.
A new column also needs careful type selection. Pick the smallest data type that will hold the necessary range. Enforce NOT NULL constraints when possible to improve performance. Add default values only if they won’t force a rewrite for every row. Avoid premature indexing on the new column until usage patterns are clear, because index creation can be as costly as the column addition itself.