HELP STATISTICS Examples | Teradata Vantage - Example: Summary Statistics on a Database - 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™

If statistics have been collected for the employee table in the personnel database, you can use the following request to obtain a list of the columns of the employee table that currently have statistics.

     HELP STATISTICS personnel.employee;

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

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


Suppose you have collected statistics on the following single and multicolumn sets from the orders table.

     COLLECT STATISTICS COLUMN (o_orderdate), 
                        COLUMN (o_orderkey), 
                        COLUMN (o_orderdate, o_orderkey), 
                        COLUMN (o_orderkey, o_orderdate) 
     ON orders;

The following request displays a summary of statistical information for the orders table.

     HELP STATISTICS orders;