O'Reilly logo

Teradata Basics for Business Users by Tom Coffing, Leona Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6 - Secondary Indexes

“Hey, every once in a while the secondary form works better than the original, but it's certainly a rarity.”

- Jaime Hernandez

Teradata Primary and Secondary Index Cheat Sheet

A table has only one Primary Index, but it can have up to 32 Secondary Indexes.

There are two types of secondary indexes and they are Unique (USI) and Non-Unique (NUSI).

Use an USI in the SQL WHERE clause and it results in a 2 second two AMP retrieve.

Use a NUSI in the SQL WHERE clause and it is an all AMP retrieve, but not a full table scan.

Unique Primary Index (UPI) Non-Unique Primary Index (NUPI)
    SELECT *    FROM Employee_Table    WHERE    Employee_No = 12345;       SELECT *      FROM Order_Table      WHERE      Customer_No ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required