17.10 - When to Use DROP and COLLECT STATISTICS - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
English (United States)

If you suspect that your table statistics are not current, you should recollect them. The statistics recollection logic retains the history of the information from the prior histograms, which is used to extrapolate stale statistics to freshen them.

The formerly recommended practice of dropping stale statistics is now deprecated because when you drop statistics, you also drop the appropriate history records.

If the column demographics are drastically changed and the history records are no longer able to determine the column trend for the new data, drop the statistics to eliminate the history records and recollect them.

Executing a COLLECT STATISTICS request writes new table demographics over the existing values, so you really do not need to drop old values prior to collecting new ones if you plan to recollect statistics for an entire table.