The following table tells what the Optimizer does if there are more inner-joined tables in a join index definition than the number of tables referenced in a query.
Situation | Optimizer Behavior |
---|---|
The extra joins are on not made on foreign key-primary key columns in the underlying base tables. | Optimizer does not consider the join index for the query plan. This is because the presence of extra joins in the definition can either eliminate existing rows from the query evaluation or produce duplicate rows during optimization. |
The extra joins are made on foreign key-primary key columns in the underlying base tables. | Optimizer considers the join index for use in for the query plan. |
Both of the following conditions are true:
|