Statistics Collection | Database Administration | VantageCloud Lake - Statistics Collection - Teradata VantageCloud Lake

Lake - Database Reference

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ohi1683672393549.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
ohi1683672393549

Collecting statistics provides the Optimizer with the data demographics needed to generate good query plans. The more accurate and up-to-date the statistics, the better the Optimizer can decide on plans and choose the fastest way to answer a query. The computed results are stored in the Data Dictionary DBC.StatsTbl for use during the optimizing phase of statement parsing. The Optimizer does not accept pragmas or hints, and bases query plans only on statistics.

Required Privileges

You must have STATISTICS privileges on a table (except a volatile table) to run a COLLECT STATISTICS request.

Resource Considerations

Collecting statistics typically involves a full-table scan, so you may need to collect statistics for large tables during off-hours.

For large tables, you can also collect statistics on a sampled subset of table rows instead of all the rows for a table, using the SAMPLE clause. For more information, see Sampling Statistics with the USING SAMPLE Option.