17.10 - Outer Joins and Simple Join Indexes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
English (United States)

Because join indexes generated from inner joins do not preserve unmatched rows, you should always consider using outer joins to define simple join indexes. This practice empowers the join index to satisfy queries with fewer join conditions than those used to generate the index.

You can define a join index using both left and right outer joins, but full outer joins are prohibited.

Be aware that when you define a join index using an outer join, you must reference all the columns of the outer table in the select list of the join index definition. If any of the outer table columns are not referenced in the select list for the join index definition, the system returns an error to the requestor.

See Restriction on Coverage by Join Indexes When a Join Index Definition References More Tables Than a Query and Rules for Whether Join Indexes With Extra Tables Cover Queries for some special considerations about how to define outer joins to maximize the coverage possibilities of a join index.