The query ran. The table stopped growing. You needed a new column, and everything depended on getting it right.
Adding a new column sounds simple, but in production systems it can mean downtime, locks, or costly rebuilds. The wrong approach can block writes, slow reads, or break indexes. Modern databases offer multiple ways to add a column—some are instant, some are not. Understanding the path you choose is the difference between a safe deploy and an outage.
First, evaluate how your database handles schema changes. In PostgreSQL, ALTER TABLE ... ADD COLUMN is fast for nullable columns with defaults as NULL, but adding a default value will rewrite the table. In MySQL (with InnoDB), adding a column can be online with ALGORITHM=INPLACE, but there are limitations with certain data types and indexes. In BigQuery or Snowflake, adding a new column is near-instant since the schema is decoupled from storage, but values for existing rows default to NULL.