Secondary, Join, and Hash Indexes | Database Design | Teradata Vantage - Secondary Indexes - Advanced SQL Engine - Teradata Database

Database Design

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

Like a PI or a PA, a secondary index (SI) facilitates access to data. An SI can be unique (USI) or nonunique (NUSI). Unlike a PI or a PA, an SI is not used to determine how data is distributed among AMPs. Also, a table may have multiple secondary indexes.

An SI is implemented as a separate subtable that is associated with the table (the base table) being indexed. SI subtables are maintained by Vantage, and cannot be accessed directly by users after they are created except to be dropped. As data changes in the base table, any associated SI subtables are automatically updated to keep the secondary indexes accurate.

An SI can supplement the benefits of a PI or PA, by indexing additional table columns, thus providing faster data access for additional types of queries. However, because they are separate subtables that must be updated when the data in the base table changes, there is a performance cost to using secondary indexes, especially for tables that change frequently. This maintenance cost must be weighed against the benefit of faster access to SI-indexed data.