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

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)

Drops sampled statistics on the specified table from the TableStatistics table in the specified QCD_name.

See these related statements for more information:

ANSI Compliance

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

Required Privileges

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

Invocation

Normally invoked using client-based database query analysis tools.

Difference Between DROP STATISTICS (QCD Form) and DROP STATISTICS (Optimizer Form)

Unlike the DROP STATISTICS (Optimizer Form) statement, DROP STATISTICS (QCD Form) does not drop the statistics kept in the data dictionary for use by the Optimizer. The DROP STATISTICS (QCD Form) drops statistics from the TableStatistics table of the specified QCD database.

DROP STATISTICS (QCD Form) and INSERT EXPLAIN WITH STATISTICS

DROP STATISTICS (QCD Form) does not drop statistics from the QCD that were captured using an INSERT EXPLAIN WITH STATISTICS request. These statistics are dropped automatically whenever their corresponding query plan is deleted from the QCD.

DROP STATISTICS (QCD Form) and Transaction Processing

You can place a DROP STATISTICS (QCD Form) request anywhere within a transaction because it is not treated as a DDL statement by the Transaction Manager.

Dropping Statistics On UDTs

You cannot DROP STATISTICS on a UDT column.