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

Help on Query Tunning - response (4) by dnoeth

$
0
0
Could you post the explain and ifo about the actual number of rows? #1: as Rajeev mentioned "ECD.Clndr_Dt" can be simply replaced by "DATE '2012-09-21' AS CIndr_Dt" and then remove all the joins to the calendar table like AND Clndr_Dt BETWEEN DL4.Eff_Start_Dt AND DL4.Eff_End_Dt   Btw, you should collect stats on *all* columns in your calendar table (it's not helpfull for this query but might be for other)   #2: Your PIs doesn't seem to be based on join/access as they include the Eff_Start_Dt.  And they are defined as NUPI, but i suppose they actually are the logical Primary Key. You should consider changing them to:   DIM_PARTY -> PRIMARY INDEX ( Party_Id  )   DIM_PARTY_LOCTR -> PRIMARY INDEX ( Party_Id )   DIM_LOCTR  -> PRIMARY INDEX ( Loctr_Id )   But check the existing stats on Party_Id/Loctr_Id if the number of rows per value is not too high, i.e. low double digit. If it's higher you might need to change SET to MULTISET.   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>