This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A lacrosse stick transferring a ball from an unused basket toward an active basket

Counting Ranked-Choice Votes With a Loop and a Table

February 6, 2020
Pinal Dave
SQL Tips and Tricks
SQL System Table, SQL Table Operation, Table Partitioning, Temp Table

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.

Read More
Illustrated cover: Temp Table vs Table Variable

SQL SERVER – Temp Table vs Table Variable – Cardinality Estimation

January 17, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Server, SQL TempDB, Temp Table

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.

Read More
A single made-up guest bed facing a long row of sleeping bags in the hall.

Table Variable Deferred Compilation: Before and After SQL Server 2019

January 4, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL Performance, SQL Server 2019, Temp Table

Compare table variable deferred compilation at compatibility levels 140 and 150, then decide when a temporary table gives better estimates.

Read More
A lone railway carriage standing lit at a platform after its engine has uncoupled and left.

GLOBAL_TEMPORARY_TABLE_AUTO_DROP: Keeping ## Tables Alive on Purpose

December 26, 2019
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Configuration, SQL TempDB, Temp Table

Understand GLOBAL_TEMPORARY_TABLE_AUTO_DROP, its version and database scope, explicit cleanup, and the risks of shared global tables.

Read More
A checkered cloth spread on market cobblestones as a makeshift stall, with a short row of lemons and one blood orange.

The VALUES Table Constructor: Using a List as a Table

December 24, 2019
Pinal Dave
SQL Tips and Tricks
SQL Joins, SQL Scripts, SQL Server, SQL Table Operation, Temp Table

Use a VALUES table constructor for inline mappings and joins, understand the INSERT row limit, and move larger reusable lists into tables.

Read More
Gouache painting of an empty rain gauge on a fence post at dawn, with heavy rain clouds approaching and a small vermilion flag on the post.

Estimated Plan With a Temp Table: Why It Guesses One Row

November 7, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Server Management Studio, Temp Table

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.

Read More
Gouache painting of a folding table in a park with tall slender jars of flowers, the last one vermilion

Nonclustered Columnstore Index on a Temp Table in SQL Server

October 31, 2019
Pinal Dave
SQL Tips and Tricks
ColumnStore Index, SQL Index, SQL Scripts, Temp Table

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.

Read More
Previous 1 2 3 4 5 6 … 11 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com