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.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.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.