15.00 - Row Distribution - Teradata Database

Teradata Database Design

Teradata Database
User Guide

Row Distribution

Teradata rows are hashed across the AMPs of a system using the row hash value of their primary index as the hash key. This does not apply for the rows of NoPI tables. See “Row Allocation for Teradata Parallel Data Pump” on page 237 and “Row Allocation for FastLoad Operations Into Nonpartitioned NoPI Tables” on page 238 for details.

Teradata Database also uses the row hash of its primary index to retrieve a row. The following graphic shows how a row is hashed and assigned to an AMP:

By carefully choosing the primary index for each table, you can ensure that rows that are frequently joined hash to the same AMP, eliminating the need to redistribute the rows across the BYNET in order to join them.

The following graphic shows how you can set up rows from commonly joined tables on the same AMP to ensure that a join operation avoids being redistributed across the BYNET: