16.20 - Example: Using TableStatsV - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ Data Dictionary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
zzu1512081120577.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

This example assumes the following statistics have been collected:

 STATISTICS
   INDEX (o_orderkey)
   ,INDEX (o_custkey, o_orderstatus)
      ON Orders;

This query can be used to retrieve the statistics:

SELECT * FROM dbc.TableStatsV
       WHERE databasename = 'sales'
         AND tablename = ‘orders’;