Collecting QCD Statistics on Multiple Columns - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

If you have defined a column set as a composite index, it makes no difference whether you collect statistics on the composite using the COLUMN keyword or the INDEX keyword. The result is identical.

For example, suppose you have created an index on the column set (x1,y1) of table t1. The following COLLECT STATISTICS requests gather the identical statistics for the named QCD into the identical QCD table columns:

     COLLECT STATISTICS FOR SAMPLE 30 PERCENT ON t1
       INTO myqcd COLUMN (x1,y1);

     COLLECT STATISTICS FOR SAMPLE 30 PERCENT ON t1
       INTO myqcd INDEX (x1,y1);