Restrictions on Sparse Join Index WHERE Clause Predicates
The following restrictions apply to WHERE clause join conditions specified in a join index definition:
The OR operator is not a valid way to connect multiple join conditions in a join index definition.
The following rules apply to the use of inequality join conditions in a join index definition WHERE clause:
The following join index definition is valid because the WHERE clause inequality join condition on o_totalprice and c_acctbal it specifies is ANDed with the previous equality join condition on o_custkey and c_custkey:
CREATE JOIN INDEX ord_cust_idx AS
SELECT c_name, o_orderkey, o_orderdate
FROM orders, customer
WHERE o_custkey = c_custkey
AND o_totalprice > c_acctbal;
The following join index definition is not valid because the WHERE clause inequality join condition has no logical AND relationship with an equality join condition:
CREATE JOIN INDEX ord_cust_idx AS
SELECT c_name, o_orderkey, o_orderdate
FROM orders, customer
WHERE o_totalprice > c_acctbal;