The is the link to the Paste A Plan site https://www.brentozar.com/pastetheplan/?id=HJklGsOR- .
By Steve Malcolm 1 asked Nov 02, 2017 at 02:07 PM
While the Paste the Plan is a great way to make a plan available for everyone to see, it is not the same as getting an Actual Plan with Plan Explorer and uploading it to this site.
Your biggest cost is obviously the SORT, does the data need to be sorted by SQL Server? Or could the application perform the sort?
I would also investigate the Key Lookup on the OrdMain table. Initially, it does an index seek on the OrderNumber index but then it must use the PK to return the BillingDate, HSTTaxAmount, and TotalOrder columns data. I would consider adding the three columns to the OrderNumber index as INCLUDE columns.
By SDyckes2 81 answered Nov 02, 2017 at 02:30 PM