Adding a column to an existing table is one of the most common schema changes in modern applications. Done correctly, it can be instant, safe, and zero-downtime. Done poorly, it can lock queries, block writes, and bring entire systems to a crawl. This is why the way you create a new column matters.
A new column is more than just a name and a type. Every change touches indexes, constraints, and possibly production traffic. In most relational databases—PostgreSQL, MySQL, MariaDB—ALTER TABLE ADD COLUMN is usually fast if it adds a nullable column without a default. But if you add a default or set NOT NULL on large datasets, the database may rewrite the table. That rewrite is costly.
For PostgreSQL, adding a nullable column is metadata-only. Adding a column with a default value precomputes and writes that value for every row, which can take minutes or hours on large tables. MySQL historically required a full table rebuild for most changes, but newer versions with ALGORITHM=INSTANT make some new column changes immediate. Always check version-specific documentation before executing in production.
When planning a migration, use feature flags or a two-step deploy. First, add the column in a non-blocking way. Second, backfill data asynchronously. Finally, enforce constraints once data is complete. This sequence allows continuous availability and safer rollouts.