16.10 - Cardinality and Uniqueness Statistics for the Reasonable Unindexed Join Examples - Teradata Database

Teradata Database SQL Request and Transaction Processing

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
User Guide
featnum
B035-1142-161K

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;