The query returned fast, but the schema had changed. A new column had been added, and nothing downstream worked.
Adding a new column can shift database performance, break existing queries, and trigger subtle data bugs. Handling it right means controlling both the data definition and the deployment path. The change can come from an ALTER TABLE in SQL, a migration script in your ORM, or a no-downtime strategy using shadow writes. Each path has tradeoffs in speed, locking, and rollback safety.
When introducing a new column, define its data type with precision. Default values can cause full table rewrites depending on the database engine. In PostgreSQL, adding a nullable column without a default is instant; adding one with a default before version 11 rewrites every row. In MySQL, online DDL can help, but large tables still risk long locks. In distributed databases, schema propagation delays can cause writes to fail unless staging and rollout are coordinated.