Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Feb 2006 @ 11:55:42 GMT


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


Subj:   Re: Performance problem with View Layering
 
From:   Srikanth Kappagantula

Hi Suresh,

There are 2 things you need to check the performance of the query. First pls. check whether the data in the table is evenly distributed in all AMP's.

You have to check the Table Skew in various AMP's.

If you have the Table Skew then change the structure of the table where it is covered by primary index and secondary. It improves the performance of the query.

I enclose the query for the skew performance.

Best of luck,


     SELECT (MAX(CurrentPerm) - MIN(CurrentPerm)) * 100
     /(NULLIF(MIN(currentperm),0))(NAMED variance)(FORMAT 'zzzzz9.99%')
     ,MAX(CurrentPerm)(TITLE 'Max')(FORMAT 'zzz,zzz,zzz,999')
     ,MIN(currentperm)(TITLE 'Min')(FORMAT 'zzz,zzz,zzz,999')
     ,TRIM(DatabaseName)||'.'||TableName (NAMED Tables)
     FROM DBC.tablesize
     GROUP BY DatabaseName, TableName
     HAVING SUM(CurrentPerm)> 1000000
     AND variance >1000
     WHERE DatabaseName NOT IN('CrashDumps','DBC')
     ORDER BY Tables;

Thanks and regards,

Srikanth K.



     
  <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