|
Archives of the TeradataForumMessage Posted: Tue, 28 Feb 2006 @ 11:55:42 GMT
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.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||