Local Nested Join | Join Planning/Optimization | Teradata Vantage - Local Nested Join - Analytics Database - Teradata Vantage

SQL Request and Transaction Processing

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
zfm1628111633230.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
evd1472255317510
lifecycle
latest
Product Category
Teradata Vantageā„¢

Definition of the Local Nested Join

Use of a local nested join implies the following:
  • If necessary, the resulting rows of a nested join are redistributed by row hashing the rowID of the right table rows.
  • The rowID is used to retrieve the data rows from the right table.
The following local nested join algorithms are available:

Join Process as a Function of Secondary Index Type on Equality Conditions

A local nested join can be applied by the Optimizer if there is an equality condition on a NUSI or USI of one of the join tables.

Whether the equality condition is made on a USI or a NUSI, stages 3 and 4 in the following process tables (the rowID join) are not always required, depending on the situation. See RowID Join.

Index Type in Equality Condition Left Table
USI
  1. Hash-redistributed based on the joined column.
  2. Nested joined with the right table.
  3. The resulting rows are redistributed by row hashing the rowID of the right table rows.
  4. The rowID is used to retrieve the data rows from the right table to complete the join.
NUSI
  1. Duplicated on all AMPs.
  2. Nested joined with the right table.
  3. The resulting rows are redistributed by row hashing the rowID of the right table rows.
  4. The rowID is used to retrieve the data rows from the right table to complete the join.