15.10 - STATISTICS - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
December 2015
Programming Reference

Optional keyword to precede object name.
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.