Patch your SQL Server 2012 instance from SP1 up to SP3.
You will then be able to use trace flag 7470, which will most likely address this. See:
FIX: Sort operator spills to tempdb in SQL Server 2012 or SQL Server 2014 when estimated number of rows and row size are correct
Thanks Paul, This query is a stripped down 'summary' of the 'details' report. I guess the core issue is that its just too slow - and the spill is a consequence of that. Any thing jump out at you about my too-slow code? Richard
Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.
Answers and Comments
query plan x554
plan explorer upload x372
execution plan x101
poor performance x94
asked: Apr 13 at 09:47 AM
Seen: 22 times
Last Updated: Apr 18 at 09:33 AM
Same Query, Two Plans, One Stinks
Component running slow
Is there a better way to search for matches
Execution plan mystery
Any idea why the filter limiting to 5K instead of 320K rows is done at the end ?
A filter with the attached query causing slowness and performance issues
Trying to understand why partition elimination is happening in some plans, but not others
Slow query - I think my index is just making things worse :(
The query takes a long time to run, looking for options to try and get it to run faster based on this plan?
Slow query - takes 2.5 to 3 minutes to run
© 2013 SQL Sentry, Inc. All rights reserved.