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 Database Engine 20, and cannot be accessed directly by users after creation 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, there is a performance cost, especially for tables that change frequently, because secondary indexes are separate subtables that must be updated when the data in the base table changes. This maintenance cost must be weighed against the benefit of faster access to SI-indexed data.