16.20 - Rules and Guidelines for SHOW STATISTICS Requests - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
English (United States)
Last Update

The following rules and guidelines apply to SHOW STATISTICS requests.

Teradata Database groups columns or indexes having the same USING options together in a single COLLECT STATISTICS request when it reports the SQL text for a database object.

If there are multiple columns with different USING options, Teradata Database reports multiple COLLECT STATISTICS requests with the corresponding using options.

The VALUES option reports detailed statistics for the specified database object. If you do not specify any columns or indexes, Teradata Database reports detailed statistics for all of the columns in the database object.

When you specify the SUMMARY option, Teradata Database reports only the table-level summary statistics for the specified table or index.

If you submit your SHOW STATISTICS request without also specifying the IN XML option, you can do any of the following things with the reported statistics.

  • Use the detailed statistics reported by the VALUES option as a backup of those statistics.
  • Submit them to Teradata Database as they are reported.
  • Transfer them to other systems in dual-active environments.

If you submit your SHOW STATISTICS request and specify the IN XML option, you can use the output for advanced processing of statistical data using methods such as graphical displays, transformations, and so on.

Teradata Database displays date, time and timestamp data in UTC format.

No conversion to local time zone is done when statistics are exported.

Similarly, when imported using COLLECT STATISTICS with VALUES clause, the Optimizer does not do any conversions to UTC. It assumes the incoming data is formatted in UTC. This ensures that the data is consistent during exports made using SHOW STATISTICS requests and imports resubmitting the SHOW STATISTICS output to Teradata Database operations irrespective of the session time zone.