Adding a new column sounds simple. It can cripple performance if done wrong. The key is to design, migrate, and deploy with zero downtime. This means thinking about schema changes, locking behavior, and how your database engine handles writes during DDL operations.
First, assess the runtime impact of adding the new column. In MySQL with older versions, ALTER TABLE often locks the entire table. In PostgreSQL, adding a nullable column with a default can trigger a full table rewrite. Modern versions support metadata-only operations in certain cases, but not all. Know exactly what your version supports before you run anything in production.
Second, choose the safest path. For large datasets, consider adding the new column without a default, then backfilling in small batches. This avoids locking and keeps queries responsive. Run backfills with throttling so they don’t saturate I/O. Monitor metrics in real time.