If your column named simply `id` isn't a unique index you've gone very wrong.
The rest of the query plan probably won't need much power.
The rest of the query plan probably won't need much power.
I leave allowances for `id` to be a stand-in for some other identity column that may represent a foreign key to another table. In which case I'd still expect SQL server's query planner to execute as: initial set is those where said column matches the supplied number, then further applies the logic to that subset. In fact I'd love to see where that isn't the case against a transactional DB.