The query and the execution plan are available at the link below.
This is from vendor application that I support. I know that there has to be a better way to write this code but the vendor says that it is the best that they can do.
I have a problem with the number of joins, the indiscriminate use of
top(1) and the use of the subqueries.
I am looking for a recommendation on how to do this better as the vendor does not appear to have the ability to improve on the query.
This query negatively impacts the performance of my production environment. Any advice would be greatly appreciated.