Join Indexes and NUSIs - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
A join index offers the same benefits as a standard secondary index in that it, like the standard secondary index, has the following properties.
  • Optional
  • User defined
  • Maintained by the system
  • Transparent to end users
  • Immediately available to the Optimizer
  • If a covering index, considered by the Optimizer for a merge join

However, a join index offers the following performance benefits over a NUSI.

Join Index Why Performance Improves
Defined using joins on one or more columns from two or more base tables Join index eliminates need to perform join step every time joining query is processed.
Used for direct access in place of one or more base tables, if the Optimizer determines that the join index covers most or all of the query. Join index eliminates I/Os and resource usage required to access base tables.
Limited to only certain data types of your choice, such as Date Join index allows direct access to join index rows within specified value-order range.
Single-table join index with a FK primary index Join index reduces I/Os and message traffic because row redistribution is optional. Row redistribution is optional because the following are hashed to the same AMP:
  • A single-table join index having a primary index based on the base table foreign key.
  • The table with the column set making up the foreign key.
Defined with an outer join Join index does the following:
  • Gives same performance benefits as single-table join index for queries that reference only outer tables.
  • Preserves unmatched rows.
Created using aggregates Join index eliminates aggregate calculations and join step for every query requiring the join and aggregate.

For more information on the syntax and usage of join indexes, see CREATE JOIN INDEX.