HELP STATISTICS SQL Statement | Teradata Vantage - HELP STATISTICS (Optimizer Form) - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Reports the summary statistics that have been collected in DBC.StatsTbl for a table, join index, or hash index.

Submit a SHOW STATISTICS request and specify the VALUES option to report detailed attributes for the statistics that have been collected for the following:
  • table
  • join index
  • hash index

You can also use SHOW STATISTICS to report SUMMARY statistics for a table, join index, or hash index.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Required Privileges

You must have one of the following privileges to perform the standard form of HELP STATISTICS.

To submit a HELP STATISTICS request on a … You must have this privilege … On …
permanent or global temporary table
  • any

    or

  • be the owner
the specified table.
volatile table none. none.
join index
  • any

    or

  • be the owner
the specified join index.
hash index any the specified hash index.
table that is protected by row-level security STATISTICS

and

OVERRIDE SELECT CONSTRAINT

the specified table.

Use either the STATISTICS privilege or the SHOW privilege to enable a user to perform HELP or SHOW requests only against the optimizer statistics collected on a specified database object.

The following table lists the privileges required to submit a HELP STATISTICS request on various database objects that are protected by row-level security constraints.

To execute HELP STATISTICS with a VALUES clause on this row-level security-protected database object … You must have the STATISTICS and OVERRIDE SELECT CONSTRAINT privileges on the …
base table base table or its containing database or user.
join index underlying table set of the index or the containing database or user of the underlying table set.
hash index underlying table of the index or the containing database or user of the underlying table.