Skew Calculation At Database Level

Database
Enthusiast

Skew Calculation At Database Level

Hi,

Following an earlier post on skew calculation at table level

http://forums.teradata.com/forum/database/skew-factor-1

will it be correct to calculate the skew at the database level using the following query ?

SELECT

,DATABASENAME

,SUM(CURRENTPERM/(1024*1024)) AS CURRENTPERM_IN_MB

,SUM(PEAKPERM/(1024*1024)) AS PEAKPERM_IN_MB

,MAXPERM/(1024*1024) AS MAXPERM_ALOTD_IN_MB

,AVG(CURRENTPERM/(1024*1024))

,MAX(CURRENTPERM/(1024*1024))

,(100 -  (AVG(CURRENTPERM)/MAX(CURRENTPERM)*100)) AS SKEWFACTOR

FROM DBC.DISKSPACE

WHERE

DATABASENAME = 'XYZ'

GROUP BY 1,4;

looking forward for the inputs

2 REPLIES
Enthusiast

Re: Skew Calculation At Database Level

Hi All,

Can anyone help me with the above query ?

Thanks in advance

Enthusiast

Re: Skew Calculation At Database Level

No. It will not be correct to check Skew at Database level.

Skew factor makes sense at a Table level and not at Database level, because Skew is determined by the PI chosen for each table and the data that is present in the table.