DROP STATISTICS Examples | SQL Statements | Teradata Vantage - DROP STATISTICS Examples - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™

Example: Drop Statistics on All Columns

The following example drops statistics on all columns and indexes for the orders table from the TableStatistics table of the QCD database named MyQCD.

     DROP STATISTICS FROM MyQCD
     ON orders;

Example: Drop Statistics on a Single Column

The following example drops statistics on a single-column NUSI named orderDateNUPI from the TableStatistics table of the QCD database named MyQCD.

     DROP STATISTICS FROM MyQCD
     ON orders INDEX orderDateNUPI; 

Example: Dropping PARTITION Statistics

The following DROP STATISTICS request drops statistics on the PARTITION column only for the table named table_1 from the TableStatistics table in the QCD named QCD_11:

     DROP STATISTICS FROM QCD_11 ON table_1
     COLUMN PARTITION;

The following DROP STATISTICS request drops statistics on the column named column_1 and the system-derived PARTITION column for the table named table_2 from the TableStatistics table in the QCD named QCD_12:

     DROP STATISTICS FROM QCD_12 ON table_2
     COLUMN (column_1, PARTITION);

The following table-level DROP STATISTICS request drops all the statistics, including statistics on the system-derived PARTITION column, for the table named table_3 from the TableStatistics table in the QCD named QCD_13:

     DROP STATISTICS FROM QCD_13 ON table_3;