The query returned fast, but something was wrong. The data was there, yet the schema had changed. A new column had been added.
Adding a new column to a database table seems simple. In production, it is not. Schema changes can lock tables, block writes, and delay requests. Even a single ALTER TABLE on a large dataset can cause downtime if handled without care. The key is balancing speed of deployment with the safety of data and uptime.
The safest path for a new column starts with understanding the migration strategy. Use an online schema change tool or a phased rollout. First, add the column as nullable with no default. This avoids heavy writes during creation. Next, backfill in small batches to reduce load on the database. After verification, enforce constraints or defaults.
Indexes on a new column require the same caution. An index build can consume resources and block critical queries. Schedule index creation during low-traffic windows or use concurrent creation features where supported.