16.20 - Outer Joins and Simple Join Indexes - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
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, Teradata Database 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.