Find Uneven Distribution | Teradata Vantage - Finding Uneven Distribution Using Hash Functions - Analytics Database - Teradata Vantage

Database Administration

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-11-03
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
Teradata Vantageā„¢

Use the following functions to identify uneven hash distribution of data.

Function Definition
HASHAMP AMP that owns the hash bucket
HASHBACKAMP Fallback AMP that owns the hash bucket
HASHBUCKET Grouping for the specific hash value
HASHROW 32 bits of row hash ID without the uniqueness field

HASHAMP Example

If you suspect distribution problems (skewing) among AMPS, the following is a sample of what you might enter for a three-column PI:

SELECT HASHAMP (HASHBUCKET (HASHROW (col_x, col_y, 
      col_z))), count (*)
FROM hash15 
GROUP BY 1
ORDER BY 2 desc;

HASHROW Example

If you suspect collisions in a row hash, the following is a sample of what you might enter for a three-column PI:

SELECT HASHROW (col_x, col_y, col_z), count (*)
FROM hash15 
GROUP BY 1
ORDER BY 2 desc
HAVING count(*) > 10;