Interview Questions   Tutorials   Discussions   Programs   

Teradata - Explain about Skew Factor?




1932
views
asked mar September 20, 2014 06:38 AM  

Explain about Skew Factor?


           

1 Answers



 
answered By vishnoiprem   0  
The data distribution of table among AMPs is called Skew Factor .
Generally For Non-Unique PI we get duplicate values so the more duplicate vales we get more the data have same row hash so all the same data will come to same amp, it makes data distribution inequality,One amp will store more data and other amp stores less amount of data, when we are accessing full table,

The amp which is having more data will take longer time and makes other amps waiting which leads processing wastage In this situation (unequal distribution of data)we get Skew Factor HighFor this type of tables we should avoid full table scans.
ex:AMP0 AMP110000(10%) 9000000(90%)in this situation skew factor is very high 90%

Query to find skew factor of a particular table?
SELECT 
TABLENAME
,SUM(CURRENTPERM) /1024/1024 AS CURRENTPERM, 
(100 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)*100)) AS SKEWFACTOR 
FROM 
DBC.TABLESIZE 
WHERE DATABASENAME= <DATABASENAME> 
AND 
TABLENAME =<TABLENAME> 
GROUP BY 1;

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert