Exclusion Join Types | Join Planning/Optimization | Teradata Vantage - Exclusion 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™

Exclusion Join—SQL Operators That Often Cause an Exclusion Join Operation

Exclusion join is a product, merge, or hash join where only the rows that do not satisfy (are NOT IN) any condition specified in the request are joined.

In other words, exclusion join finds rows in the first table that do not have a matching row in the second table.

Exclusion join is an implicit form of the outer join.

Exclusion product joins with dynamic row partition elimination are not supported for8-byte partitioning.

Also see Inclusion and Exclusion Product Joins with Dynamic Row Partition Elimination.

The following SQL specifications frequently cause the Optimizer to select an exclusion join:
  • Use of the NOT IN logical operator in a subquery.
  • Use of the EXCEPT and MINUS set operators.

Exclusion Joins and NULLABLE Columns

To avoid returning join rows that are null on the join column, use one of the following methods:
  • When you create a table, define any columns that may be used for NOT IN join conditions as NOT NULL.
  • When you write a query, qualify a potentially problematic join with an IS NOT NULL specification. For example:
    WHERE Customer.CustAddress IS NOT NULL