17.10 - Cardinality and Uniqueness Statistics for the Reasonable Unindexed Join Examples - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Request and Transaction Processing

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
User Guide
Publication ID
B035-1142-171K
Language
English (United States)

Dimension Table Cardinality Statistics

For LT/ST-J2a (Reasonable Unindexed) join example, the following row information is given for the small tables:

Attribute Cardinality (rows)
                           color                                               3
                           size                                             10
                           options                                             10

Fact Table Uniqueness Statistics

The following statistics information is given for the large table:

Column Name Number of Unique Values
                           color                                               6
                           size                                             30
                           options                                           300

No index is created on the collection of join columns (color, size, and options) of the large table.

Test Query

The following query is used for the LT/ST-J2a (Reasonable Unindexed) join in this example:

     SELECT *
     FROM widget, color, size, options
     WHERE widgets.color=color.code
     AND   widgets.size=size.code
     AND   widgets.options=options.code
     AND   size.description=options.description;