Lock-Related Restrictions
The system places row-hash-level WRITE locks on DBC.StatsTbl while dropping statistics. These locks prevent parsing of new requests against the data table for which the statistics had been collected until the drop operation completes.
Transaction-Related Restrictions
DROP STATISTICS must be entered as a single statement request, as the only statement in a macro, or as the last or only statement in a Teradata session mode explicit transaction enclosed by BEGIN TRANSACTION and END TRANSACTION statements.
Dropping Statistics on BLOB, CLOB, Period, and Geospatial Columns
You cannot drop statistics on BLOB, CLOB, Period, or Geospatial columns.
When to Use DROP and COLLECT STATISTICS
If you suspect that your table statistics are not current, 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.
Running a COLLECT STATISTICS request writes new table demographics over the existing values, so you need not drop old values before collecting new ones if you plan to recollect statistics for an entire table.
Rules and Restrictions for DROP STATISTICS
- If you drop the statistics on an object using explicit column specification, Vantage does not drop the object-level statistics for the object.
To do this, you must use the object-level DROP STATISTICS syntax.