Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

How to validate whether my PI selection is right? - response (2) by Wasif.Kabeer

$
0
0
  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).      

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>