The Temp Tables For Destruction counter stays flat at zero while Temp Tables Creation Rate moves, and that confuses people. This post explains what each counter counts, reads both from T-SQL, measures a creation loop, and shows that a cached temp table in a procedure moves neither counter.
Count TempDB Data Files: Five Ways to Check in SQL Server
You can count tempdb data files with the Properties window, three queries or the error log. This post shows all five checks with their results, explains what each one reads, and compares the count with the number of CPUs. It also covers the case where the Properties window won’t open.
Memory-Optimized TempDB Tables: List Them and Check Status
Memory-optimized TempDB tables are the system tables that SQL Server 2019 and later can keep in memory. This post shows two queries: one that checks whether the feature is on, and one that lists the tables it covers. It also explains the limits that come with the feature.
Metadata Contention in TempDB: When Memory-Optimized Metadata Helps
Metadata contention in TempDB happens when many sessions create and drop temporary tables at the same moment. This post reads the waits that point to it, explains why RESOURCE_SEMAPHORE is a different problem, and shows how SQL Server 2019 and later can keep that metadata in memory.
What is Stored in TempDB? – Interview Question of the Week #271
Question: What is Stored in TempDB?
Answer: In my recent conversation my client asked me if I know what is currently stored in their TempDb.
KEEP PLAN Hint: Cut Temp Table Recompiles in SQL Server
The KEEP PLAN hint gives a temp table the same recompile threshold as a permanent table. This post counts statistics recompiles with Extended Events for a plain query, a KEEP PLAN query and a KEEPFIXED PLAN query. It shows where the hint helps, where it does nothing and what the stronger hint costs.
AUTOGROW_ALL_FILES: What Replaced Trace Flags 1117 and 1118
AUTOGROW_ALL_FILES and MIXED_PAGE_ALLOCATION replaced trace flags 1117 and 1118, which once made tempdb grow its files together and use whole extents. This post checks the flags on a server, reads the settings that replaced them and demonstrates both on a demo database. It also says what to do with a startup parameter that still names them.







