Suppose we have a query plan with table
tblX
being accessed via the
ref
access method:
tblX.key_part1 = expr1 AND tblX.key_part2 = expr2 AND ...
Before performing an index lookup, we determine whether any of
the expr
values
is i
NULL
. If it is, we don't perform the
lookup, but rather immediately return that the matching tuple
is not found.
This optimization reuses the null_rejecting
attribute produced by the early NULL
s
filtering code (see
Section 7.3.1.1, “Early NULLs Filtering”). The check
itself is located in the function
join_read_always_key()
.