The query finished. The schema was tight. But the new column demanded space, order, and speed.
Adding a new column can be trivial or dangerous, depending on how you do it. In high-volume systems, schema changes risk locking tables, blocking writes, or breaking downstream jobs. The wrong migration plan can turn a quick change into an outage.
A safe new column starts with understanding your database engine. PostgreSQL, MySQL, and cloud-managed variants each treat schema changes differently. Some allow fast metadata-only operations for nullable columns without defaults. Others rewrite the entire table, doubling I/O and stressing replication.
In PostgreSQL, adding a nullable column without a default is fast. Adding a default with ALTER TABLE rewrites the table. For MySQL with InnoDB, ONLINE DDL can reduce lock times, but defaults still write to all rows. Cloud databases like Amazon RDS or Google Cloud SQL run the same rules under the hood.