HASH
Calculates a hash value over the function arguments, producing a value in the range 0 <= x < 263
.
The HASH
function is typically used to segment a projection over a set of cluster nodes. The function selects a specific node for each row based on the values of the row columns. The HASH
function distributes data evenly across the cluster, which facilitates optimal query execution.
Behavior Type
Syntax
HASH ( { * | expression[,...] } )
Arguments
* | expression[,...]
|
One of the following:
|
Examples
=> SELECT HASH(product_price, product_cost) FROM product_dimension WHERE product_price = '11'; hash --------------------- 4157497907121511878 1799398249227328285 3250220637492749639 (3 rows)