15.00 - Teradata Database Hashing Algorithm - Teradata Database

Teradata Database Design

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

Teradata Database Hashing Algorithm

The Teradata Database hashing algorithms are proprietary mathematical functions that transform an input data value of any length into a 32‑bit value referred to as a rowhash, which is then used to assign a row to an AMP.

Primary‑indexed rows are allocated to the AMPs based on the hashed value of their primary index (see “Row Allocation for Primary‑Indexed Tables” on page 235).

Rows that are inserted into nonpartitioned or column‑partitioned NoPI tables using Teradata Parallel Data Pump ARRAY INSERTs are not allocated to the AMPs based on the value of their primary index, but on the value of the Query ID for their request (see “Row Allocation for Teradata Parallel Data Pump” on page 237).

Rows that are inserted into nonpartitioned or column‑partitioned NoPI tables using INSERT … SELECT operations are appended AMP‑locally to their target table, so there is no need to hash them to a destination AMP.

The rows that are FastLoaded into nonpartitioned NoPI tables (see “NoPI Tables, Column‑Partitioned Tables, and Column-Partitioned Join Indexes” on page 280) are assigned to their destination AMPs using a different hashing algorithm than the hashing algorithm used for primary‑indexed rows and rows inserted into an nonpartitioned or column‑partitioned NoPI table using Teradata Parallel Data Pump ARRAY INSERT operations. FastLoaded rows are hashed on a combination of their AMP vproc ID and an internal counter rather than on a Query ID (see “Row Allocation for FastLoad Operations Into Nonpartitioned NoPI Tables” on page 238 for details).

You can select from among several hashing algorithms to use with your system, depending on the character sets your site uses. The only difference among the available hashing algorithms is how they are optimized to handle different character sets such as those used by double-byte Asian languages and European languages that use various diacritical marks. You cannot define multiple hashing algorithms for the same system.