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.
- COLLECT DEMOGRAPHICS
- INITIATE INDEX ANALYSIS
- INSERT EXPLAIN
- RESTART INDEX ANALYSIS
- Teradata Vantage™ - SQL Request and Transaction Processing, B035-1142
- DROP STATISTICS (QCD Form)
- HELP STATISTICS (Optimizer Form) in Teradata Vantage™ - SQL Data Definition Language Detailed Topics, B035-1184
For more information about client-based query analysis tools, seeTeradata® 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
- INDEX or DROP TABLE on table_name or its containing database.
- INSERT and UPDATE on the TableStatistics table or its containing QCD database.