December 2013
Intermediate to advanced
1872 pages
153h 31m
English
The next statements the Query Optimizer looks for in the query are OR clauses. OR clauses are SARGable expressions combined with an OR condition rather than an AND condition and are treated differently than standard SARGs. The format of an OR clause is with all columns involved in the OR belonging to the same table.
SARG or SARG [or ...]
This IN statement
column in ( constant1, constant2, ...)
is also treated as an OR clause, becoming this:
column = constant1 or column = constant2 or ...
Some examples of OR clauses are as follows:
where LastName = 'Smith' or FirstName = 'Fred'where (Name like '%bearing%' and ListPrice > $25) or ProductSubcategoryID ...