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

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

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.