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

SQL Data Definition Language Syntax and Examples

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

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.