Are boolean expressions in SQL WHERE clauses short-circuit evaluated ?
For example:
SELECT *
FROM Table t
WHERE @key IS NULL OR (@key IS NOT NULL
You have to keep in mind how databases work. Given a parameterized query the db builds an execution plan based on that query without the values for the parameters. This query is used every time the query is run regardless of what the actual supplied values are. Whether the query short-circuits with certain values will not matter to the execution plan.