Hi Friends,
the following query is taking very very long time. But i dont know where is the mistake
please help me.
SELECT C.WMC,C.BNo,C.RcptNo,C.RcptDt,C.Comper,C.ComAmt,C.comtyp,R.Amt,P.PrdGrp,P.PrdCde,P.PrdNm,
CST.Frequency,T.BDT,T.WMC as T_WMC,T.BDT, W.Wnm,W.Wrnk FROM tblComm C
INNER JOIN tbltransreceipts R ON C.RcptNo=R.RcptNo INNER JOIN tbltransaction T ON T.BNo=C.BNo INNER JOIN tblproduct P ON T.PrdCde=P.PrdCde
INNER JOIN tblcust_prd_wor CST ON T.cst_cde=CST.cst_cde INNER JOIN tblworker W ON T.WMC=W.WMC WHERE (T.BCDE LIKE 'SLKRI') AND
((C.RcptDt) Between ('2012-05-01') And ('2012-05-05')) AND (C.WMC LIKE 'SLKRI8000003');
Note all the required joining columns are indexed.
( i have also attached the query execution plan too)
please help me to solve this issue.