Adding a new column should be fast, safe, and predictable. In practice, it often isn’t. Schema changes can lock tables, block writes, and trigger downtime. The key is understanding how your database engine handles ALTER TABLE operations and how to control the impact in production.
A new column in PostgreSQL, MySQL, or SQL Server is not just an extra field. It changes storage, indexes, and sometimes query plans. In PostgreSQL, adding a nullable column with a default can be instant in newer versions, but older versions rewrite the entire table. MySQL performs table copies in some scenarios, unless you use ALGORITHM=INPLACE or ALGORITHM=INSTANT for supported column types.
When designing for a new column, plan both schema and data migration. First, add the column without a default to avoid table rewrites. Then, backfill data in small batches using UPDATE with a limit. Finally, set the default and constraints after the backfill is complete. This minimizes lock times and reduces risk.