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