HELP STATISTICS Example | Teradata Vantage - 17.05 - Example: Summary Statistics - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Advanced SQL Engine
Teradata Database
Release Number
January 2021
Content Type
Programming Reference
Publication ID
English (United States)

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.