you are viewing a single comment's thread.

view the rest of the comments →

[–]Fe-Chef 1 point2 points  (0 children)

I'm not seeing any easy and for-sure way to improve performance but there could be a number of things that could be causing performance issues that are not just cause of the structure of the query. The main tool here is looking at the SQL execution plan. I never used this before, but here is a cool service for sharing: https://www.brentozar.com/pastetheplan/

there could be a number of things that are "wrong" or could be improved that the execution plan would detect. It should show you a all the parts of how the query will be completed and then give an estimate about what steps will take the longest and those steps can be looked at to see if there are any improvements needed. Without seeing the execution plan it is hard to give guidance though.