17.10 - Statistics Cache - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Request and Transaction Processing

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
User Guide
Publication ID
B035-1142-171K
Language
English (United States)

The Statistics Cache

The statistics cache minimizes Parser overhead required to optimize queries. It does this by caching statistics, UDI counts, and other demographic information from the Data Dictionary that has been fetched during a session to optimize SQL queries.

When the Optimizer requires statistics to process a table, it first retrieves the summary information for all the statistics on the table. Vantage stores the retrieved demographic data in the statistics cache, where it is expected to remain cached for an extended period. The purpose of the statistics cache is to retain statistics that have been fetched to optimize queries in memory for as long as possible.

You can use the DBS Control field NumStatisticsCacheSegs to change the size of the statistics cache. See Teradata Vantageā„¢ - Database Utilities, B035-1102 for further information about fine tuning the statistics cache.

Unlike the dictionary cache, Vantage does not purge the statistics cache periodically, purging it only when operations to collect or drop statistics occur.