A filter with the attached query causing slowness and performance issues
Attached query/query plan is a part of filter we use in our SSRS reports i.e. it is the query for clicking on a report(later comes the data fetching query part).
We have witnessed this running very slow.
Have tried updating stats and creating missing indexes, but seems no help.
Please help in understanding the cause and what can be done here to improve the performance, as it takes around 10 minutes to display the results when run on SSMS.
@SQLkiwi, new plan attached link text
CREATE INDEX IX_sitidfk_soridfk ON #temp (tsosite_sitidfk) INCLUDE (tsoorganization_soridfk);
And this index on [tblWooWorkorder]:
CREATE INDEX tblWooWorkorder_bcoIdFk_SitIDFk ON [tblWooWorkorder] (wooProfitCenter_bcoIdFk, wooSite_SitIDFk);
Please capture a new actual plan with those indexes in place and edit your question to add the new query analysis file (please do not add it as an 'answer).