DWHPro Insights

Statistics

Understanding Teradata Statistics Histograms: How the Optimizer Estimates Cardinality for WHERE Conditions

Illustration of a stopwatch dial on an orange paint-splash background

Teradata Statistics Histograms – A Short Introduction Many are familiar with the Optimizer’s statistical confidence levels. I was recently surprised to discover that a “high confidence” rating does not guarantee a fully accurate estimation (provided the statistics collected are not stale). While I remain hopeful that my observations may be attributed to a bug, I wanted …

Read more

Collect Statistics in Teradata – Evaluation

Illustration of a stopwatch dial on an orange paint-splash background

Collect Statistics in Teradata – The Evaluation After collecting every combination considered necessary and helpful, you can check the result of the collected statistics on a table by looking at Consider the lengthier collection time when planning maintenance and scheduling, even within regular or optimal conditions. Simplify and maintain the collection method, particularly for smaller tables …

Read more

How Teradata Optimizer Uses Multi-Column Statistics

Illustration of a stopwatch dial on an orange paint-splash background

A recent question came in about how the Teradata Optimizer uses multi-column statistics. Here are the essential details: The Optimizer uses multi-column statistics when the query’s WHERE clause covers all columns. This example pertains to Teradata 13.10. The query was executed without gathering Primary Index statistics, resulting in low confidence from the Optimizer. To boost …

Read more

Teradata Table Skew: Understanding Natural and Artificial Skew with DBC.TableSizeV

Illustration of a stopwatch dial on an orange paint-splash background

Teradata table skew is a common issue encountered while working with the Teradata database. If you’re reading this page, you may have experienced this problem. Common knowledge When searching for Teradata table skew or skew factor online, most or all documentation will refer directly to DBC.TableSizeV for computation. To analyze table skew, the commonly used …

Read more

Tracking Teradata Statistics Usage with StatUseCountV

Illustration of a person in a suit standing beside a database cylinder

How to find out if the Teradata Statistics we created for a specific workload are used? Teradata statistics greatly affect SQL query efficiency. We need a reliable method to get this information. Various objects, such as tables and join indexes, can have statistics collected on them. As performance tuners, it is important to confirm their …

Read more

The Importance of Up-to-Date Statistics for Teradata SQL Tuning

Illustration of a stopwatch dial on an orange paint-splash background

1. Complete and up-to-date Statistics At the start of Teradata SQL Tuning, statistics are a vital concern. The Teradata Optimizer employs statistics to formulate the optimal execution plan for our query. The adequacy of statistics or dynamic AMP sampling varies according to the data demographics. To initiate optimization, updated statistics must be provided to the …

Read more

Maximizing Performance with Teradata Dynamic AMP Sampling: An Introduction

Illustration of a stopwatch dial on an orange paint-splash background

Introduction to Teradata Dynamic AMP Sampling Teradata calculates dynamic AMP samples for indexed columns (PI, USI, NUSI) at runtime without requiring statistics. These samples provide key information, including table cardinality and distinct values. They are stored in the FSG cache of each AMP’s table header. This process is referred to as dynamic AMP sampling. A …

Read more

Teradata Sample Statistics: When, How, and Why to Use Them

Illustration of a stopwatch dial on an orange paint-splash background

Introduction to Teradata Sample Statistics Discover the optimal utilization of Teradata Sample Statistics, including when, how, and why to implement them. Sample statistics require columns with a high degree of diversity in values. A UPI satisfies this criterion, and only columns with numerous unique values should be considered for collecting sample statistics for the NUPI. …

Read more

DWHPro

Expert network for enterprise data platforms. Senior consultants, project teams built for your challenge — across Teradata, Snowflake, Databricks, and more.

📍Vienna, Austria & Jacksonville, Florida

Quick Links
Services Team Teradata Book Blog Contact Us
Connect
LinkedIn → [email protected]
Newsletter

Join 4,000+ data professionals.
Weekly insights on Teradata, Snowflake & data architecture.