15.00 - Primary Indexes - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Primary Indexes

Teradata Database tables can have 0 or 1 primary index. If you do not define either PRIMARY INDEX or NO PRIMARY INDEX explicitly when you create a table, then a default primary index for a table may be defined or the table may default to have no primary index (see “Primary Index Defaults” on page 263 for details).

Use the CREATE TABLE statement to create primary indexes (see “CREATE TABLE” in SQL Data Definition Language).

Note that Teradata does not use the term primary index in the same way it is commonly used to describe a clustered index in an indexing system based on B+ trees.

Data accessed using a primary index is always a one-AMP operation because a row and its primary index are stored together in the same structure (see “Base Table Row Format” on page 740). This is true whether the primary index is unique or nonunique, and whether it is row partitioned or nonpartitioned.