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
Gouache painting of three fresh rolls in a vermilion basket on a counter in front of a tray of dough still waiting

OPTION FAST N: First Rows Sooner, Total Reads Higher

February 11, 2020
Pinal Dave
SQL Performance
Execution Plan, Query Hint, SQL Scripts, SQL Server

OPTION FAST N tells SQL Server to plan for the first N rows, so the first rows arrive in milliseconds and the whole result costs much more. This post measures both sides on 300,000 rows with logical reads and time to the first row. It also explains why the hint belongs to paging and not to tuning.

Read More
Gouache painting of a basket of red apples under an apple tree in an orchard row

DISABLE_OPTIMIZER_ROWGOAL: How a Row Goal Changes the Plan

February 7, 2020
Pinal Dave
SQL Performance
Execution Plan, Query Hint, SQL Scripts, SQL Server

DISABLE_OPTIMIZER_ROWGOAL switches off a row goal, the optimizer’s bet that a query needs only a few rows, and TOP, FAST, IN and EXISTS all place that bet. This post reads the estimates behind it, shows how the plan shape changes, and shows when the bet fails. A covering index fixes the failure, and the hint does not.

Read More
RID Lookup

SQL SERVER – Heaps, Scans and RID Lookup

January 25, 2020
Pinal Dave
SQL Performance
Clustered Index, Execution Plan, SQL Heap, SQL Index, SQL Scripts, SQL Server

The question was do heaps are very bad and always force a table scan? Let us learn about RID Lookup, Heaps and table scan.

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 tray of flat-head screwdrivers beside a closed wooden box, a hand hovering between them on a workbench.

Why a Filtered Index Is Ignored by Parameterized Queries

January 15, 2020
Pinal Dave
SQL Performance
Execution Plan, Parameter Sniffing, SQL Index, SQL Performance

Explain why a filtered index is ignored with parameters, inspect plan warnings, and compare literal filters, RECOMPILE, and coverage fixes.

Read More
Sorted paper fills a worktable while excess slips rest in a side basin

What is TempDB Spill in SQL Server? – Interview Question of the Week #259

January 12, 2020
Pinal Dave
SQL Interview Questions and Answers
Execution Plan, SQL Memory, SQL Scripts, SQL Server, SQL TempDB

When SQL Server uses TempDB when any query does not have enough memory to do its operation, it is called TempDB Spill. Let’s learn 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
Previous 1 … 10 11 12 13 14 15 16 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

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