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. See COLLECT STATISTICS (Optimizer Form).
- COLLECT STATISTICS Syntax (QCD Form)
- COLLECT STATISTICS Usage Notes (QCD Form)
- COLLECT STATISTICS Examples (QCD Form)
INSERT EXPLAIN and INITIATE INDEX ANALYSIS are supported only on the Block File System on the primary cluster, not on the Object File System.
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.