skew factor

Database
Enthusiast

skew factor

hi

what is skew factor????? what is the use of that?

22 REPLIES
Teradata Employee

Re: skew factor

Hello,

Skewness is the statistical term, which refers to the row distribution on AMPs. If the data is highly skewed, it means some AMPs are having more rows and some very less i.e. data is not properly/evenly distributed. This affects the performance/Teradata's parallelism. The data distribution or skewness can be controlled by choosing indexes.

HTH.

Regards,

Adeel
Enthusiast

Re: skew factor

thx

how 2 find out skew value?
Fan

Re: skew factor

Try something like:

SELECT TSIZE.DatabaseName
,TSIZE.TableName
,TDEF.CreateTimeStamp AS Created
,TDEF.LastAlterTimeStamp AS LastAltered
,TDEF.AccessCount
,TDEF.LastAccessTimeStamp AS LastAccess
,SUM(TSIZE.CurrentPerm) AS CurrentPerm
,SUM(TSIZE.PeakPerm) AS PeakPerm,
(100 - (AVG(TSIZE.CurrentPerm)/MAX(TSIZE.CurrentPerm)*100)) AS SkewFactor
FROM DBC.TableSize TSIZE
JOIN DBC.Tables TDEF
ON TSIZE.DatabaseName = TDEF.DatabaseName
AND TSIZE.TableName = TDEF.TableName
GROUP BY 1,2,3,4,5,6;

Lower the skew factor the better - although if you have only a very few rows on a table you are going to have a skewed table no matter what!

Teradata Employee

Re: skew factor

In Teradata Administrator you can simply right-click the table and select "Space Summary".

Regards,

Adeel

Re: skew factor

What is a acceptable Skew Factor ? Say if one of my table is having skew factor of 16. Is it acceptable?

--Thanks in advance.

Re: skew factor

how to check the skew factor?
suppose i use Primary index that situation how to distributes the row?
suppose i use unique Primary index that situation how to distributes the row?
normally if we u PI then data will distribute evenly thats not an issue
if we use UPI then how we have to distributes the records evenly

Re: skew factor

Hi,
how to distributes the row in mload if we use UPI and how in fload if we use UPI and how if we use NUPI
and finally i have to distributes the row evenly to all AMPs for best skew factor,
any one which best way to distribute the row evenly in mload and fload when we use UPI and NUPI

Re: skew factor

Skew facter is tell the distribution of rows
if uniformally distribution i.e skew is the zero
if the skew factor is reverse of parllel efficence
Enthusiast

Re: skew factor

Hi,

Below is the query which is usefull to find out skewfactor.

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;