Principal Criteria for Selecting a Primary Index - 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 assigning columns to be the primary index for a table, there are three essential factors to remember: uniform distribution of rows, optimal access to the data, and the volatility of indexed column values.

Selection criteria may conflict. For example, specifying a NUPI instead of a UPI, or specifying an alternate key as the UPI instead of the primary key.

There are additional criteria to evaluate when selecting the primary index for a queue table. See Selecting a Primary Index for a Queue Table for a description of the primary index selection criteria you need to evaluate when choosing a primary index for a queue table.

These criteria apply only to selecting a column set for the primary index, not to making a decision whether to partition the primary index.

With the exception of column-partitioned tables, Vantage assigns a default primary index to a table if you do not specify an explicit PRIMARY INDEX or NO PRIMARY INDEX in the CREATE TABLE request you use to create the definition for the table (see Primary Index Defaults).

Ideally, the primary index column is never updated.