Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 19 May 2007 @ 22:40:55 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Skew on voltile table
 
From:   Castelli Emanuel Alejandro

Hi all...here's my question:

I want to know the skew factor of a volatile table. Actually, I run this query:

     select databasename,
            SUM(cast(t.currentspool as decimal(18,0))/(1024*1024)) perm_mb,
            100*((cast(max(t.currentspool ) as decimal(18,3)) -
                cast(ave(t.currentspool ) as decimal(18,3))))
                /(nullif(cast(max(t.currentspool) as decimal(18,3)),0)) as tableskew,
            100*((cast(max(t.currentspool ) as decimal(18,3)) -
                cast(min(t.currentspool ) as decimal(18,3))))
                /(nullif(cast(min(t.currentspool) as decimal(18,3)),0) ) as tablevariance
            from dbc.diskspace t
            where databasename = 'MY_USER'
            group by 1;

It's OK, but it works when I have only a table in spool. I need to calculate the skew for an specified table when I have more than a table in spool. Is there other table where I can watch this information?


Thanks in advance.

Castelli, Emanuel Alejandro
Desarrollo DataWarehouse - IBM Argentina



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016