Rules for Whether Join Indexes with Extra Tables Cover Queries - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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:
  • 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.