Four people rank three topics and nobody has a majority. Here is a small loop that eliminates the weakest topic, moves its ballots and logs every round.
SQL SERVER – Temp Table vs Table Variable – Cardinality Estimation
I had a very interesting conversation with one of my clients about Cardinality Estimation for Temp Table vs Table Variable. Let us discuss it today.
Table Variable Deferred Compilation: Before and After SQL Server 2019
Compare table variable deferred compilation at compatibility levels 140 and 150, then decide when a temporary table gives better estimates.
GLOBAL_TEMPORARY_TABLE_AUTO_DROP: Keeping ## Tables Alive on Purpose
Understand GLOBAL_TEMPORARY_TABLE_AUTO_DROP, its version and database scope, explicit cleanup, and the risks of shared global tables.
The VALUES Table Constructor: Using a List as a Table
Use a VALUES table constructor for inline mappings and joins, understand the INSERT row limit, and move larger reusable lists into tables.
Estimated Plan With a Temp Table: Why It Guesses One Row
An estimated plan for code that fills a temp table guesses one row for every read of that table. This post compares the estimated plan and the actual plan on SQL Server 2025, shows where the numbers split, and explains when to trust each one.
Nonclustered Columnstore Index on a Temp Table in SQL Server
A nonclustered columnstore index works on a temp table but not on a table variable. This post loads a temp table, builds the index, and measures the same aggregate query before and after. It also shows the error a table variable raises and when the build cost pays off.







