Example: Using StatsV - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
muh1623078990997.ditamap
dita:ditavalPath
muh1623078990997.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantage™

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.StatsV
       WHERE databasename = 'sales'
         AND tablename = ‘orders’;