15.00 - UNIQUE Versus Non-Unique Secondary Indexes - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

UNIQUE Versus Non‑Unique Secondary Indexes

The UNIQUE option creates a USI which, perhaps redundantly, prevents the occurrence of duplicate index values in the indexed base table. Only one row can have a value set in the column set that corresponds to an entry in the subtable of a unique secondary index. The subtable of a unique secondary index is a hashed table, which is very efficient for retrieving a single row.

When the values of non‑unique secondary indexes are used to apply complex conditional expressions to very large tables, efficient retrieval is achieved by bit mapping the subtable row IDs.