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

Find skew with perm over 1gb - forum topic by vc

$
0
0

Hello,
I am using the below query 

SELECT 

cast(DatabaseName as char(30)),

cast(Tablename as char(40)),

(100 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)*100) (FORMAT 'zz9.99') )AS Skewfactor_greater_90,

cast (CURRENT_date as timestamp(0)) + ((current_time -time '00:00:00') hour to second(0)) As AS_ON

FROM 

DBC.TABLESIZEV 

where  DATABASENAME like ('prstn%')

having Skewfactor_greater_90 >=90

GROUP BY 1,2

Order by 1,3;

 

As the query is finding and calculating skew in term od percentage  and displaying the ones greater than 90

 

How can  we find  the skew with perm over 1 GB????

Forums: 

Viewing all articles
Browse latest Browse all 100

Trending Articles