Adding a new column should be fast, predictable, and safe. Yet in production systems with live traffic, schema changes can lock tables, block queries, and trigger downtime. The difference between a clean migration and a painful outage often comes down to the method you choose.
A ALTER TABLE ... ADD COLUMN in SQL can be instant for small datasets. But as row counts grow, default operations may rewrite the entire table. On MySQL with InnoDB, that can take minutes or hours. PostgreSQL handles some additions without a full rewrite if you add a nullable column with no default. Understanding these engine-specific behaviors is critical before altering real user data.
For teams deploying continuously, the safest pattern for a new column is a two-step approach. First, add the column in a way that avoids locking. Then backfill data in small batches while monitoring performance. Avoid setting non-null constraints until the backfill is complete, or you risk hitting conflicts mid-deployment.