Adding a new column sounds simple, but under load, it’s a precision job. Whether you run Postgres, MySQL, or a distributed SQL database, adding fields to a production table can trigger locks, rewrite large data files, or stall queries. The wrong command at the wrong time costs uptime. You need a method that combines speed, safety, and zero-debug deployment.
A ALTER TABLE ... ADD COLUMN operation is the standard. In Postgres, adding a nullable column without a default is fast because it only updates metadata. Add a default, and the engine rewrites the table, which can be slow. In MySQL, ADD COLUMN can cause a table copy depending on storage engine and version; use ALGORITHM=INPLACE or INSTANT when supported to avoid downtime.
For high-volume systems, staged migrations work best. First, add the column as nullable with no default. Deploy code that populates it for new writes. Backfill in small batches to avoid locking hot rows. Finally, set the default and constraints in a separate migration once the backfill is complete. This pattern reduces impact, keeps read/write availability, and keeps schema changes safe even under heavy load.