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

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
Product Category
Teradata Vantage™

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. Such join indexes are referred to as broad join indexes. For more information on broad join indexes, see Restriction on Coverage by Join Indexes When a Join Index Definition References More Tables than a Query, Teradata Vantage™ - Database Design, B035-1094, and Teradata Vantage™ - SQL Request and Transaction Processing, B035-1142.

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 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