15.10 - Example: A Simple Recollect Statistics Request Using the THRESHOLD Option - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Published
December 2015
Content Type
Programming Reference
Publication ID
B035-1144-151K
Language
English (United States)
Last Update
2018-06-05

The following request collects statistics on the multicolumn set (o_orderstatus, o_orderkey) for the first time and specifies the FOR CURRENT option. Teradata Database collects the requested statistics, but because of the FOR CURRENT specification, it does not store the THRESHOLD setting nor does it store the default threshold options from the DBSControl parameters DefaultUserChangeThreshold and SysChangeThresholdOption or cost profile constants StatsDefaultUserChangeThreshold and StatsSysChangeThresholdOption.

     COLLECT STATISTICS
     USING SYSTEM THRESHOLD FOR CURRENT
     COLUMN (o_orderstatus, o_orderkey)
     ON orders;