Statistics and Other Demographic Data for Join Indexes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Collect statistics on the indexes of a join index to provide the Optimizer with the information required to generate an optimal plan.

The COLLECT STATISTICS (Optimizer Form) statement collects demographics, computes statistics from them, and writes the resulting data into individual entries for each individual base table and join index table on the system.

To the Optimizer, a multiple-table join index and its base tables are separate entities. You must collect statistics on multiple-table join index columns separately from the statistics you collect on their underlying base table columns because the column statistics for multitable join indexes and their underlying base tables are not interchangeable.

However, it is preferable to collect statistics on the underlying base table of a single-table join index and not directly on the join index columns. The derived statistics framework supports bidirectional inheritance of statistics between a non-sparse single-table join index and the underlying base table. For more information, see Derived Statistics.