Adding a new column is straightforward when the table is small. But on large datasets, schema changes can lock writes, block reads, and disrupt production. The right approach depends on your database engine, version, and workload.
Plan before you act.
Map the exact name, data type, and nullability for the column. Avoid ambiguous defaults. If the column is for computed data, consider generating its values asynchronously after creation to reduce migration impact.
Choose zero-downtime strategies.
In PostgreSQL, an ALTER TABLE ... ADD COLUMN with a DEFAULT can write to every row. To avoid locking, add the column without a default, then update data later in batches. In MySQL, online DDL operations can be enabled with ALGORITHM=INPLACE to reduce lock contention. For distributed systems, test migrations against staging clusters with production-like load before running live.