16.20 - STATISTICS - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Content Type
Programming Reference
Publication ID
B035-1144-162K
Language
English (United States)
Last Update
2019-05-24
ON

Optional keyword to precede object name.
CURRENT
Reports extrapolated table-level summary QCD statistics.

Example: Summary Statistics

The report produced by the summary form of HELP STATISTICS (QCD Form) is identical to that produced by the summary form of HELP STATISTICS (Optimizer Form).

Assume you collected statistics on the Employee table at the same time using COLLECT STATISTICS (Optimizer Form) and COLLECT STATISTICS (QCD Form) with a 99 percent sample percentage, then the following request would report the columns and indexes of the Employee table that currently have sampled statistics in the table_statistics table of the my_qcd database.

     HELP STATISTICS personnel.employee FROM my_qcd;

The result shows that statistics were last collected for YrsExp on 02/06/17, when there were 17 unique values for the column.

     Date     Time     Unique Values        Column Names 
     -------- -------- -------------------- ---------------- 
     02/06/17 13:12:45                   17 yrs_exp

The report does not reflect sample size. Sample size is mentioned only to ensure that the comparison between the reports is accurate. A significantly smaller sample size could produce somewhat different statistics.