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

Teradata Vantage™ - SQL Data Manipulation Language

Advanced SQL Engine
Teradata Database
Release Number
January 2021
English (United States)
Last Update

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® Viewpoint User Guide, B035-2206, Stats Manager topic.

ANSI Compliance

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

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.