I was inspired by a recent article I read on parameter sniffing to add my own contribution to the topic, I explain how tempdb spools occur due to poor memory grants and they impact of parameter values in determining how much resources are allocated. I then go on to cover two different ways that the DBA and Developer can manipulate the behavior of the Optimizer to ensure that procedures are granted enough memory.
TempDB Spills and Performance Tuning
References:-
http://www.sommarskog.se/query-plan-mysteries.html
Please Consider Subscribing
