Adding a new column sounds simple. In production, it isn’t. Schema changes can lock tables, stall queries, and cause unexpected downtime. Every extra second your database is locked, requests fail. Every unexpected null breaks logic. The cost is real.
A new column in SQL should be deliberate. In PostgreSQL, ALTER TABLE ... ADD COLUMN is straightforward, but defaults combined with NOT NULL can rewrite the whole table. Use NULL first, backfill in small batches, then apply constraints. This avoids full-table locks.
In MySQL, adding a column to large tables can trigger a full copy of the data. Check your engine and version—ALGORITHM=INPLACE and LOCK=NONE are your friends, but not always available. For high-traffic systems, test the migration on a clone with production-level data size before touching live.
In distributed databases, adding a new column can affect replication. Schema changes must propagate without lag. Monitor replication delay. Apply the change during low-traffic windows or with online schema change tools like gh-ost or pt-online-schema-change.