You may check the skew factor of the PI column by using the below query. Minimum the skew factor, better is the distribution.
/*
Get Skew factor of a single column
*/
SEL (100 - (AVG(total)/MAX(total)*100)) as skewfactor
FROM
(
SELECT HASHAMP(HASHBUCKET(HASHROW(ColumnName))) ampno,
COUNT(*) total
FROM DatabaseName.TableName
GROUP BY 1
)
tab1 ;
(Code snipped added special characters, hence didn't use it).
↧