UNIQUE Versus Nonunique Secondary Indexes - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

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 nonunique secondary indexes are used to apply complex conditional expressions to very large tables, efficient retrieval is achieved by bit mapping the subtable row IDs.