Is the Hash Match between table6 and table1 causing TEMPDB to blow up?

Large query causing 140GB TEMPDB to run out of space. It appears that the hash match may be a problem. Without seeing the query, is there any advice?

avatar image By sqlenforcer 1 asked Aug 28, 2014 at 06:20 PM
more ▼
(comments are locked)
avatar image Aaron Bertrand ♦ Aug 28, 2014 at 06:26 PM

Why is the sort after the hash match necessary? Can you create an index that supports it to remove the sort operator at all? How about the missing index SQL Server suggested for table1? Why is table 5 a heap? Can you add a clustered index, or expand the existing non-clustered index so a RID lookup is not required? Can't really get more specific than that without seeing the query (some of these things may just disappear with a rewrite).

avatar image sqlenforcer Aug 28, 2014 at 09:22 PM

Thank you Aaron, I'll look at your advice and return if needed.

avatar image SQLkiwi ♦ Aug 28, 2014 at 10:38 PM

A post-execution plan would be more helpful than the current estimated one.

10|10000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.

Follow this question

Topics:

x641
x166
x7
x6

asked: Aug 28, 2014 at 06:20 PM

Seen: 147 times

Last Updated: Aug 28, 2014 at 10:38 PM