Example: Collect Statistics on a Single-Column NUSI - Teradata VantageCloud Lake

Lake - Working with SQL

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

This example collects statistics on a single-column NUSI named orderDateNUPI on the order_date column from a random sample of 10 percent of the rows in the orders table and writes the statistics to the TableStatistics table of the QCD database named MyQCD.

COLLECT STATISTICS FOR SAMPLE 10 PERCENT
ON orders INDEX orderDateNUPI
INTO MyQCD;