Adding a new column sounds simple. In production, it can bring systems to a crawl if done wrong. Schema changes hit live databases with real traffic, and blocking writes for minutes can mean lost revenue. The right approach is careful, controlled, and tested before it ever touches production.
A new column in SQL means altering a table. In PostgreSQL and MySQL, ALTER TABLE ADD COLUMN is straightforward for nullable, default-free columns. The operation is near-instant because it only updates metadata. But if you add a column with a default or a NOT NULL constraint, the database must rewrite every row. That can lock the table, impact concurrency, or spike disk I/O.
For large datasets, use rolling schema changes. First, add the new column as nullable with no default. Next, backfill in small batches to avoid stress on replicas. Finally, enforce constraints and set defaults once the data is populated. This sequence limits lock times and keeps queries fast throughout the migration.