You needed a new column, but the query hung. The database locked. The deploy stalled. Adding a column seems trivial—until it happens in production, under live load, with users hitting every table and index.
A new column alters the schema. Depending on the size of the table and the database engine, it can trigger a full rewrite of the data file. On large datasets, this is costly. It blocks writes. It risks downtime. MySQL with InnoDB can run an instant add column under certain conditions, but older versions will lock the table. PostgreSQL can add a new nullable column fast, but adding a column with a default value will rewrite the table unless you use the right syntax.
When you create a new column, think about type, constraints, and defaults. Avoid default expressions that trigger table rewrites. Use NULL where safe, then backfill asynchronously. For large backfills, batch updates and throttle execution to keep load predictable.
Indexes on new columns must be built with care. A concurrent index build in PostgreSQL avoids locks but is slower. In MySQL, online DDL can help, but replication lag may grow. Production stability outweighs speed.