The query returned in under a second, but the data was wrong. You forgot one thing: the new column.
Adding a new column to a database table sounds simple, but it can break production if done without care. Schema changes shift how your application reads and writes data. Indexes, constraints, and default values can change query plans and latency. Done poorly, this creates downtime and inconsistent state.
Start with clarity on the purpose of the new column. Decide on the exact name, data type, and whether it can be null. Adding a nullable column is safer and faster on large tables because it avoids backfilling locks. If it must be non-null with a default, consider staged deployment. First, add the column as nullable. Then backfill data in small batches. Finally, enforce NOT NULL once all rows are valid.
In PostgreSQL, ALTER TABLE my_table ADD COLUMN new_column TEXT; is instant for nullable columns with no default. For MySQL, it may still lock the table depending on your engine and version. Always test in a staging clone before touching production. Measure the migration time with real data volume, not estimates.