15.00 - Hash-Related Functions - Teradata Database

Teradata Database Design

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

Hash-Related Functions

Teradata SQL provides several functions that you can use to analyze the hashing characteristics of your existing indexes and candidate indexes. These functions are documented fully in SQL Functions, Operators, Expressions, and Predicates.

The following table summarizes the hash-related functions. Note that they can be nested.

 

This function …

Returns the …

HASHAMP

number of the AMP associated with an expression.

HASHBAKAMP

number of the backup AMP associated with an expression.

HASHBUCKET

number of the hash bucket associated with a hash row expression.

The range of possible values returned by HASHBUCKET varies depending on how your system is configured for hash bucket size.

  • For systems with 16‑bit hash buckets, the possible values returned by HASHBUCKET range from 0 - 65,535.
  • For systems with 20‑bit hash buckets, the possible values returned by HASHBUCKET range from 0 - 1,048,575.
  • HASHROW

    hexadecimal rowhash value for an expression.

    Note: Unity Director does not support these hash-related functions.