Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 27 Nov 2007 @ 18:20:39 GMT


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


Subj:   Re: Delete Statement taking a long time to run.
 
From:   Pararha, Shubhangi (S.)

A hot amp indicates that data is skewed. I've had a similar problem in the past, and changing the PI helped.

To select the PI you can use the below query:

     Select hashamp(hashbucket(hashrow(Primary Index))) ,Count(*)
     From MCKSG03_RESP_TBL
     Group By 1;

To check the current skew factor of table use:

     SELECT DatabaseName
     ,TableName
     ,100 * (1 - (AVG(currentperm) / MAX(currentperm))) skew_factor
     FROM dbc.tablesize
     Where TableName  = 'name of your table'
      And DatabaseName    = 'name of your database'
     GROUP BY 1,2
     ORDER BY 1,2;

Regards,

Shubhangi



     
  <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: 15 Jun 2023