Complex qualifications
A complex qualification is a WHERE clause in which two or more logical operators are used on the same column on which the R-tree index is defined.
If you specify a complex qualification in a query that includes
only AND or only OR logical operators, then the entire qualification
is evaluated using one R-tree index scan. An example of a complex
qualification that uses only AND logical operators is WHERE
Overlap(A,B) AND Contains(A,C) AND Contains(A,D)
, where A
is
the indexed column. An example of a complex qualification that uses
only OR logical operators is WHERE Overlap(A,B) OR Contains(A,C)
OR Contains(A,D)
.
If, however, you mix AND and OR logical operators in the same complex
qualification, the R-tree index is not used at all for any of the
predicates. This means that arbitrary logical expressions cannot necessarily
use an R-tree index. An example of a complex qualification that mixes
AND and OR logical operators is WHERE Overlap(A,B) AND Contains(A,C)
OR Contains(A,D)
, where A
is the indexed
column.