The SQL to review  distribution across all segments

Post date: Oct 31, 2014 2:8:24 AM

select gp_segment_id, count(*) , abs(count(*) - avg(count(*)) over(order by gp_segment_id rows between unbounded preceding and unbounded following))/count(*) skew

from bloattest

group by gp_segment_id

order by gp_segment_id

limit 100;