Temp tables, cursors, sorts and row versioning all use TempDB. Here is the script I use to find who is consuming my TempDB right now.
SQL SERVER – Story of Temporary Objects
Temp tables, table variables and more: the story of Temporary Objects in SQL Server, why you would use them and how they can help performance and scalability.
SQL SERVER – Is tempDB behaving like a Normal DB?
TempDB is a special shared database, but in many ways it behaves like a normal DB with a twist. I share how I explained it to DBAs during my tuning work.
Memory-Optimized Table Variables
Memory-optimized table variables can avoid tempdb work, but they need a filegroup, indexed table type, memory budget, and workload tests.
Temp Table Scope in Nested Procedures and Dynamic SQL
Explain temp table scope across nested procedures and dynamic SQL, reproduce missing and duplicate-name errors, and pass rows safely.
Cursor Options That Matter: LOCAL, FAST_FORWARD and STATIC
Test SQL Server cursor options, including LOCAL FAST_FORWARD and STATIC, on one loop while measuring time and tempdb cost.






