Hi,
I need help in reducing the execution time of the query.
First query - it join 6 tables and there select of few specified columns, when executed separately it is taking 10 mins - return 118K records
second query - join of three tables and return 5 columns, when executed separately it is taking 19 secs - 7568 records
but when left outer join first and second query it is taking one hour 15 mins. there also select column and not select *. There is group by on final dataset for sum(Qty) column
I checked the execution plan, it shows 49% in second query table for clustered index and 26% in first query in one of the join. For that I have added filter and it reduced to 5 % in first query.
Apart from that all steps are showing 0% or < 3%. Any suggestion will be great.