Teradata Access Paths: 8 Essential Ones to Know

The optimizer has various access paths to consider when creating the execution plan, each with unique advantages and disadvantages. This article will introduce the 8 most essential access paths. The lack of a hash index may surprise you; however, Teradata has entirely substituted it with the single-table join index and discourages its utilization in the newest documentation. The single-table join index can execute all the hash index functions and more.

1. FULL TABLE SCAN

This technique enables scanning each row only once and grants access to any combination of columns as specified in the WHERE clause. It is the most suitable approach when all rows need to be read without exception.

The program reads each data block from a table and usually requires a spool table that is equal to or greater in size than the original table.

2. UNIQUE PRIMARY INDEX (UPI)

The most economical way to access data is by utilizing the primary index columns in the WHERE condition. This method exclusively accesses a single AMP and does not produce a spool file. It uses row hash locking, which provides a highly precise approach.

None.

3. NON-UNIQUE PRIMARY INDEX (NUPI)

It offers efficient access using only one AMP and enables row-hash locking based on the number of rows selected, which may necessitate a spool file.

NUPI’s SET tables may suffer from inadequate INSERT performance due to duplicate row checks.

4. UNIQUE SECONDARY INDEX (USI)

This method optimally retrieves queries with a WHERE condition, including all USI columns, using only two AMPs, eliminating the need for a spool table.

Index maintenance causes extra overhead for INSERT, UPDATE, MERGE, and DELETE actions.

5. NON-UNIQUE SECONDARY INDEX (NUSI)

It facilitates efficient access for columns with low distinct values, but requires all AMPs to be accessed, which may result in a spool table.

It incurs overhead for INSERT, UPDATE, MERGE, and DELETE statements. However, the optimizer avoids using it when accessing many data blocks, since it requires accessing all AMPs. In such cases, a full table scan is often more cost-effective.

6. SINGLE-TABLE JOIN INDEX

Limiting index columns to frequently used ones reduces IOs. The primary index in the index table may differ from the base table.

It incurs overhead for INSERT, UPDATE, MERGE, and DELETE queries.

7. MULTI-TABLE JOIN INDEX

This obviates the need for performing joins or aggregates and can potentially fulfill intricate queries without referencing the source table. Additionally, it can have a unique PI compared to the source table and act as a replacement for NUSI and USI.

Multi-Table Join Indexes result in additional workload for INSERT, UPDATE, MERGE, and DELETE statements that involve any associated base tables. It is recommended to avoid utilizing them for tables that undergo substantial modifications.

8. SPARSE JOIN INDEX

The overhead for statements such as INSERT, UPDATE, MERGE, and DELETE is minimized by limiting the storage of index rows compared to a standard join index. Furthermore, the optimizer can utilize it to access infrequent values, given that it is restricted to selective column values.

Causes overhead for INSERT, UPDATE, MERGE, and DELETE statements.

The Teradata Join Index

The Teradata Primary Index

The Teradata NUSI

Related Services

⚡ Need Help Optimizing Your Data Platform?

We cut data platform costs by 30–60% without hardware changes. 25+ years of hands-on tuning experience.

Explore Our Services →

📋 Considering a Move From Teradata?

Get a personalized migration roadmap in 2 minutes. We have migrated billions of rows from Teradata to Snowflake, Databricks, and more.

Free Migration Assessment →

📊 Data Platform Migration Survey

Help us map where the industry is heading. Results are public — see what others chose.

1. What is your current data platform?

2. Where are you migrating to (or evaluating)?

Migrating FROM
Migrating TO

Thanks for voting! Share this with your network.

Follow me on LinkedIn for daily insights on data warehousing and platform migrations.

Stay Ahead in Data Warehousing

Get expert insights on Teradata, Snowflake, BigQuery, Databricks, Microsoft Fabric, and modern data architecture — delivered to your inbox.

Leave a Comment

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.