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;