Rules and Guidelines for SHOW STATISTICS Requests - 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 following rules and guidelines apply to SHOW STATISTICS requests.

The 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, the 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, the database reports detailed statistics for all of the columns in the database object.

When you specify the SUMMARY option, the 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 the 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.

The 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 the database operations irrespective of the session time zone.