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

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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;