Adding a new column to a database table sounds simple, but when code, storage, and query paths are tied to revenue, precision matters. Done right, it is a quick operation. Done wrong, it can lock tables, drop indexes, or break downstream services.
A new column in SQL alters the table structure. Whether you use ALTER TABLE in PostgreSQL, MySQL, or another RDBMS, the database must update metadata and possibly rewrite rows. In small tables this is instant. In large, high-traffic tables, it can trigger long locks or replication lag. Engineers often stage the change: first add the new column as nullable, then backfill in controlled batches, then enforce constraints.
For PostgreSQL new column operations, adding a nullable column with no default is fast because it only updates system catalogs. Adding a DEFAULT value to existing rows forces a full table rewrite on older versions. In MySQL new column operations, the behavior varies by engine and version. InnoDB may rebuild the table unless the change is online DDL–compatible.