The query returned fast, but the data was wrong. You forgot the new column.
A new column changes everything. It shifts the shape of your table, your indexes, and your queries. In relational databases, adding a new column is one of the most frequent schema changes. Done right, it is simple. Done wrong, it can lock writes, cause downtime, and break production.
When you add a new column, you alter the schema. Most SQL engines let you run ALTER TABLE ... ADD COLUMN. The syntax is standard, but the impact varies. On small tables, the change is instant. On large tables, especially under load, it can trigger a full table rewrite. That rewrite will block operations, stall transactions, and consume I/O.
To make it safe, you must plan. Check how your database engine handles a new column in your version. Postgres adds new columns with a default of NULL instantly, but a default value requires rewrites. MySQL’s behavior depends on the storage engine and version. Modern engines have optimizations, but older setups may still lock.