15.00 - Uniqueness Value - Teradata Database

Teradata Database Design

Teradata Database
User Guide

Uniqueness Value

Teradata Database uses an additional 32-bit system-generated uniqueness value to ensure the uniqueness of any rowID (see “Hash Collisions” on page 228).

Base table row distribution to the AMPs for primary‑indexed tables is always determined by the rowhash value for the primary index on the table, while index subtable values are hashed on the value of the secondary index they represent.

For NoPI tables and column‑partitioned tables, the rowhash value for rows loaded by Teradata Parallel Data Pump or FastLoad is always assigned by the destination AMP.

Hashing on Query ID or hashing as done by FastLoad determine the destination AMP, not the hash bucket.

See “Row Allocation for Teradata Parallel Data Pump” on page 237 and “Row Allocation for FastLoad Operations Into Nonpartitioned NoPI Tables” on page 238.

If the primary index for a table is row‑partitioned, then its partitioning expression controls the order in which the rows are stored once they have been hashed to an AMP, but the selection of the AMP a row hashes to is controlled only by its rowhash value.

Retrieval operations use the primary index value for a row plus any existing secondary, join, or hash indexes that the Optimizer determines would reduce the cost of the activities required to retrieve the row.

Primary index operations use only the rowhash value, while secondary index operations use the entire rowID value.