17.10 - Naming Collected 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)

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.