
7.1
Basic Query Tuning 173
Chapter 7
ments. Let’s examine each in turn with various options and recommenda-
tions for potential improvement.
Equi, Anti, and Range
The syntax of equi, anti, and range comparison conditions is as follows:
<expression> { [!]= | > | < | <= | >= } <expression>
<expression> [ NOT ] BETWEEN <expression> AND <expression>
Using an equals sign (equi) is the fastest comparison condition if a
unique index exists, potentially finding a single row as an exact row hit. Any
type of anti comparison, such as != or NOT, is looking for what is not in a
table and thus must read the entire table regardless; sometimes full index
scans can ...