Adding a new column should be fast, safe, and predictable. In many systems, it isn’t. Schema changes can lock tables, slow queries, or even cause downtime. The right approach depends on database type, data volume, and your tolerance for risk.
In PostgreSQL, ALTER TABLE ADD COLUMN is straightforward, but if you add a column with a default value, the entire table can be rewritten. To avoid long locks, add the column without a default, then set the value in batches. For MySQL, the impact depends on whether you’re using InnoDB and what version you’re running. Newer releases support instant add column for certain operations. MongoDB avoids schema enforcement, but adding an indexed field to documents still triggers write operations and needs careful rollout.
A new column must be tested in staging with real data sizes. Check query plans before and after. Monitor replication lag if your database is replicated. Track migration time on a canary database before pushing to production.