15.10 - Nested Join Examples - Teradata Database

Teradata Database SQL Request and Transaction Processing

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
User Guide
featnum
B035-1142-151K

This section provides the EXPLAIN outputs for the same two-table join under two different circumstances.

  • No nested join
  • Nested join in where the USI for one table is joined on a column from the other table.
  • For these examples, assume the following table definitions:

     

    Table Name

    Column 1 Name

    Column 2 Name

    Primary Index Name

    Unique Secondary Index Name

    Number of Rows

    table_1

    NUPI

           y_1

    NUPI

    none defined

                      2

    table_2

    NUPI

           USI_2

    NUPI

             USI_2

        1,000,000

    The following request is tested against this database, both using and without using nested join:

         SELECT * 
         FROM table_1,table_2 
         WHERE y_1 = USI_2;