Refactoring and improving the performance of code is a regular occurrence in the working day of a developer. Being able to identify if a particular query refactoring has helped improve an execution plan can sometimes be difficult. To help us identify plan changes, SSMS 16.x and higher now offers the option to compare execution plans.
By saving the execution plan and the T-SQL of our initial query as a .sqlplan file, we can then run our redesigned query and compare the two plans. In the following screenshot we see how to initiate a plan comparison:
Upon activation, we must choose ...