Predicate in a WHERE clause corresponds to relational operation known as restriction, i.e. rows at the exit of FROM clause restrict themselves to those for which the predicate is evaluated as TRUE.
If cond1 and cond2 are simple conditions, the restriction by predicate
cond1 AND cond2
is equivalent to intersection of
restrictions by each of predicates.
The restriction by predicate
cond1 OR cond2
is equivalent to union of restrictions by each of predicates, whereas the restriction by predicate
NOT cond1
is equivalent to set difference where restriction by predicate cond1 is subtracted from initial relation.
If no indexes are on the columns in conditions, query execution plan will use table scan. In the first variants of above solutions such a table scan will be used only once, whereas the solutions on the basis of union, intersection, and exception of queries will use a table scan twice plus operation for comparison of row sets will be presented (ex. Nested Loops). This makes a query a less effective, although there may exist optimizers capable for producing the same execution plan for two cases being compared by us.