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
Two icebergs cut at the waterline, the smaller-looking one hiding a huge mass below.

Why Query Cost Percentages in a Plan Mislead You

December 5, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Performance, SQL Server

Test why query cost percentages are estimates by comparing two statements with STATISTICS IO, TIME, and query DMV counters.

Read More
Two matching kites on the grass, differing only in their tails, one short and red.

Comparing a Good and a Bad Plan for One Query in Query Store

December 3, 2019
Pinal Dave
SQL Performance
Execution Plan, Query Store, SQL Performance, SQL Server

Compare a good and a bad plan in Query Store using runtime history, SSMS Compare Showplan, estimates, joins, grants, and parallelism.

Read More
Gouache painting of a stack of wooden crates with one pear on top and a vermilion padlock, beside smaller crates on a harbor quay

Memory Grant Feedback Loop: When SQL Server Stops Adjusting

November 29, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Memory, SQL Scripts

The memory grant feedback loop adjusts a grant after every run, and a query whose needs swing can send it back and forth. In a tested demo SQL Server stops adjusting on run 33 and falls back to its first grant. The post also shows what SQL Server 2025 does by default.

Read More
Gouache painting of a large cardboard box holding a terracotta pot with empty space around it beside a small snug box with a cream pot

IsMemoryGrantFeedbackAdjusted Values: What Each Status Means

November 28, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Memory, SQL Scripts

IsMemoryGrantFeedbackAdjusted values tell you what SQL Server did with the memory grant of one run. A tested demo produces every status: first execution, accurate grant, adjusting, stable, percentile adjusting and feedback disabled. The post also shows which run each status appears on.

Read More
Gouache painting of three wooden boxes of growing size, with a blue fabric bundle in the middle one and a vermilion bundle in the smallest

Memory Grant Feedback Explained: How SQL Server Learns

November 27, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Memory, SQL Scripts

Memory grant feedback explained with one small demo. A sort asks for 13256 KB, uses 160 KB, and gets a corrected grant of 1536 KB on the next run. The post also shows how to read the status in the plan and what the feature needs.

Read More
Gouache painting of an empty tray beside a vermilion crate packed with nails on a shop counter

Locally Aggregated Rows: Why a Columnstore Scan Shows Zero

November 25, 2019
Pinal Dave
SQL Performance
ColumnStore Index, Execution Plan, SQL Scripts

A columnstore scan shows zero actual rows when it aggregates rows itself, and the rows sit in the locally aggregated rows property. A tested demo on 1,000,000 rows shows 0 actual rows and 1,000,000 locally aggregated rows. The post also covers a scan that really is empty, and what STATISTICS IO counts.

Read More
Gouache painting of a tangled old thread spool beside a fresh vermilion spool on a sewing table

Procedure Recompilation: Force a New Plan in SQL Server

November 22, 2019
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Scripts, SQL Stored Procedure

Procedure recompilation builds a new plan without changing the procedure. A tested demo compares EXEC with WITH RECOMPILE and sp_recompile on a skewed table, with 100,089 reads on a stale plan and 348 on a fresh one. It also shows that sp_recompile removes every cached plan of the procedure.

Read More
Previous 1 … 12 13 14 15 16 17 18 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

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