Using Unique Secondary Indexes to Enforce Row Uniqueness - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

When a nonprimary index uniqueness constraint is created (a PRIMARY KEY or UNIQUE constraint), Vantage implements the index as a USI.

As a general guideline, whenever you define a primary index for a multiset table to be a NUPI, particularly if the table is created in ANSI/ISO session mode (where the default for tables is multiset), consider defining one of the following uniqueness constraints on its primary key or other alternate key to facilitate row access and joins.
  • Unique secondary index
  • UNIQUE NOT NULL constraint
  • PRIMARY KEY NOT NULL constraint

    Unless used to define the default UPI for a table, PRIMARY KEY and UNIQUE constraints are mapped internally as USIs. See Primary Index Defaults.