COLLECT STATISTICS | SQL Statements | Teradata Vantage - COLLECT STATISTICS (QCD Form) - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

Collects demographic data for one or more columns and indexes of a table, computes a statistical profile of the collected data, and stores the synopsis in the TableStatistics table of the specified QCD database.

Statistics collected by this statement are used for index analysis and validation tasks performed by database query analysis tools. These statistics are not used by the Optimizer to process queries. For information on COLLECT STATISTICS (Optimizer Form), see Teradata Vantage™ - SQL Data Definition Language Detailed Topics , B035-1184 .

For more information about index analysis, see:
For more information about client-based query analysis tools, see:
  • Teradata® Index Wizard User Guide, B035-2506
  • Teradata® Viewpoint User Guide, B035-2206, Stats Manager topic

Required Privileges

You must have the following privileges to perform COLLECT STATISTICS (QCD Form):
  • INDEX or DROP TABLE on table_name or its containing database.
  • INSERT and UPDATE on the TableStatistics table or its containing QCD database.

ANSI Compliance

COLLECT STATISTICS (QCD Form) is a Teradata extension to the ANSI SQL:2011 standard.