A schema change landed during deployment. The database froze for a second. Queries spiked. Logs flared. All for a single new column.
Adding a new column should be simple. In practice, it can be dangerous. The impact depends on size, constraints, indexing, and read/write load. Done wrong, it locks tables, slows transactions, and stalls production. Done right, it’s invisible to the business and safe for users.
The first question to answer: is the new column nullable? Adding a nullable column with no default is usually instant. A NOT NULL column with a default is another story—many databases rewrite the entire table when you do it. The difference can turn a 50 ms schema change into hours of downtime.
On large datasets, use online schema change tools or partition updates to avoid full table locks. Postgres offers ADD COLUMN ... DEFAULT ... without rewrite in newer versions—if you know how to enable it. MySQL’s ALGORITHM=INSTANT can help, but not for all column types. Every engine has traps you must know before running ALTER TABLE.