Five stages of grief - internals of a hash spill
You know the Hash Match operator. You know it requires a lot of memory. And you also know that it sometimes needs more memory than it has, in which case it spills to tempdb and is slow.
But do you know EXACTLY what happens under the cover in the case of a hash spill? Or does you knowledge stop at "it gets slow"?
Unless you work for Microsoft on the SQL Server engineering team, there really is no need to know the internals of a hash spill. But that doesn't mean you can't be curious! Would you like to waste some time to learn about dynamic role reversal, grace hash join, bail-out, bit-vector filtering, and more, then join this sessions!
I make SQL Server fast (.com)