Answer by bopeavy
Since not sure what the results do? I recommend since a merge generally updates, deletes, inserts based on the results. You could try replacing the with cte with a temp table or a variable table or etc...
View ArticleAnswer by Kevin Feasel
A few quick points which might be helpful. When optimizing a query this large, going through the plan is a pain, but it's the best way to do it. I don't have access to your query plans, so any...
View Article
More Pages to Explore .....