Naming Collected Statistics - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

When you collect statistics on an index or column set, you can optionally specify a name for them. A name is required if statistics are for other than column references.

You can later use the name for recollections, copies, transfers, help information, show information, and for dropping the collected statistics. The rules for naming statistics are the same as the rules for naming database objects, which are documented in Teradata Vantage™ - SQL Fundamentals, B035-1141.

When you recollect statistics, if the column ordering is different, the Optimizer treats the statistics as new. By naming the statistics you collect and then using the names when you recollect statistics guarantees that the existing statistics are recollected instead of creating a new set of statistics.

Duplicate names are not allowed for table or constant expression statistics. You can only use COLUMN specification to recollect statistics using statistics names.