SQL/MP Query Guide
Improving Query Performance Through Query
Design
HP NonStop SQL/MP Query Guide—524488-003
3-21
Controlling the Expansion of Predicates
Table 3-2. Rules for Expansion of Useful Equality Predicates
Condition Expansion Example
The equivalence class
contains a constant
expression.
Equality predicates are
generated between all pairs
of members that are single
columns of different tables
so that a hash join, sort
merge join, or key-
sequenced merge join can
occur. Also, an equality
predicate is generated
between the constant
expression and each of the
other members.
Before:
T.C = 1 AND
U.D = 1
After:
T.C = 1 AND
U.D = 1 AND
T.C = U.D
The number of members of
the equivalence class is less
than or equal to the value for
the DEFINE for
=_SQL_CMP_EQ_LIMIT.
Equality predicates are
generated between all pairs
of members.
Suppose that the DEFINE
=_SQL_CMP_EQ_LIMIT is
set to 3 or greater.
Before:
T.C = T.D AND
T.D = V.E
After:
T.C = T.D AND
T.D = V.E AND
T.C = V.E
The number of members of
the equivalence class that
are single columns is less
than or equal to the value for
the DEFINE for
=_SQL_CMP_EQ_LIMIT.
Equality predicates are
generated between all pairs
of members that are single
columns of different tables.
Suppose that the DEFINE
=_SQL_CMP_EQ_LIMIT is
set to 2.
Before:
T.C = T.D + :hv1 AND
U.C = T.D + :hv1
After:
T.C = T.D + :hv1 AND
U.C = T.D + :hv1 AND
T.C = U.C
The number of members in
the equivalence class that
are single columns exceeds
the value for the DEFINE for
=_SQL_CMP_EQ_LIMIT.
No extra equality predicates
are added for this
equivalence class.
Suppose that the DEFINE
=_SQL_CMP_EQ_LIMIT is
set to 2.
Before:
T.C = T.D AND
U.C = T.D
After:
T.C = T.D AND
U.C = T.D