15.00 - Primary Index Storage - Teradata Database

Teradata Database Design

Teradata Database
User Guide

Primary Index Storage

Primary indexes are stored in-line with the row they index as a rowhash value and row uniqueness ID (see “Rowhash and RowID” on page 197). If a table is defined with row partitioning, the system also stores the internal partition number of the row.

Because of this, you cannot drop or change a primary index when the table is nonempty. Instead, you must drop the entire table definition and then recreate it with the new primary index.

The primary index for a table is stored in hash-order for a standard index or in hash-order within partition for a row‑partitioned index.

Related Topic

For additional usage information and design tips about primary indexes, see Chapter 9: “Primary Indexes and NoPI Objects,”.