The query finished running, but the data was wrong. You scanned the table twice to be sure. The problem was obvious: the schema had changed, but the code had not. A new column had been added upstream, and everything downstream broke in quiet, wasteful ways.
Adding a new column sounds simple. In relational databases like PostgreSQL, MySQL, or SQL Server, it is a schema change that carries both technical risk and operational impact. It can slow queries, lock tables, and disrupt migrations if done without planning. In systems with high write throughput or zero-downtime requirements, even a single ALTER TABLE statement can cause outages.
To add a new column safely, first examine the database engine's locking behavior. PostgreSQL can add columns with a default NULL almost instantly, but defaults with non-null constants will rewrite the entire table. MySQL’s behavior depends on the storage engine and version. Cloud data warehouses like BigQuery or Snowflake can accept new columns without downtime, but schema drift can still break ETL pipelines.