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

SQL Query Tunning - response (5) by dnoeth

$
0
0
Hi Mahesh, I did proper tuning like collect stats and seconday index creation as per required columns Some remarks: - None of the existing indexes will be useful for this query. - Looks like a data model where the logical PK/UNIQUE constraints are implemented as-is. This will result in perfectly distributed tables, but probably bad performance. - The ROW_WID columns look like a reminder from Oracle "create a numeric PK on every table additionally to the logical PK" - A PI should be chosen mainly based on JOINs   An index on B.LOGIN would help a bit, but the main problem are the PIs. Changing the PI of all tables to a PI (probably UPI) on INTEGRATION_ID will probably help other queries, too. If you can't change the PIs this Join Index should fully cover your query and run sub-second: CREATE JOIN INDEX xxxx AS SELECT (B.LOGIN), (C.NAME, A.VIS_PR_BU_ID) FROM W_PARTY_PER_D A,WC_USER_D B, W_PARTY_ORG_D C WHERE A.INTEGRATION_ID = B.PAR_INTEGRATION_ID AND A.VIS_PR_BU_ID = C.INTEGRATION_ID PRIMARY INDEX (LOGIN)Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>