Great video. Something also worth mentioning is that the Memory Grant size depends on the underlying data being sorted. If that table has many nvarchar(large) or nvarchar(max) fields then it can cause havoc. It's often overlooked but the much spoken about "dont put all character fields as large nvarchar or varchar data types anti-pattern"'s main issue can be the memory grant if memory dependant operators are needed. I have seen it take up 80 GB.
Great video. Something also worth mentioning is that the Memory Grant size depends on the underlying data being sorted. If that table has many nvarchar(large) or nvarchar(max) fields then it can cause havoc. It's often overlooked but the much spoken about "dont put all character fields as large nvarchar or varchar data types anti-pattern"'s main issue can be the memory grant if memory dependant operators are needed. I have seen it take up 80 GB.
Nice video.
Great tip.
Thanks for the demo. However, seems like there’s a little bit of a trade between using less memory and having to maintain an index.
Is this technique works on Azure SQL too?