15.00 - Rules for Whether Join Indexes With Extra Tables Cover Queries - Teradata Database

Teradata Database Design

Product
Teradata Database
Release Number
15.00
Content Type
User Guide
Publication ID
B035-1094-015K
Language
English (United States)

Rules for Whether Join Indexes With Extra Tables Cover Queries

The following rules explain how to design a set of underlying base tables for a join index definition in such a way to ensure that the Optimizer selects the index for an access plan if it inner joins more tables than the query references.

 

IF there are more inner‑joined tables in a join index definition than the number of tables referenced in a query and …

THEN the Optimizer …

the extra joins are on not made on foreign key‑primary key columns in the underlying base tables

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

considers the join index for use in for the query plan.

both of the following conditions are true:

  • The join column set of the inner table in the extra outer join is unique
  • Either the inner table or both the inner and outer tables involved in the extra outer join are extra tables