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 a vermilion vintage camera on a tripod beside a print of the hill it points at

Last Known Actual Plan in SQL Server: Query Plan Stats

May 11, 2019
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL DMV, SQL Scripts, SQL Server 2019

The last known actual plan is the plan of the most recent run of a cached query, with its real row counts. This post turns the feature on for one database, reads the plan with sys.dm_exec_query_plan_stats and compares estimated rows with actual rows.

Read More
Gouache painting of a clay pot beside the vermilion wooden form it was shaped around

Compiled Parameter Values in SQL Server: Read Them From the Cache

May 7, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Cache, SQL DMV, SQL Stored Procedure

Compiled parameter values show which value SQL Server used when it built a cached plan. This post reads them from the plan cache with one query, then shows how the first caller shapes the plan for everyone after. It ends with the usual ways to break that link.

Read More
A fern frond pressed under glass on sun-print paper, its exact pale outline captured on the blue sheet.

Capturing Actual Execution Plans From a Script With SET STATISTICS XML

May 1, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Scripts, SQL Server, SQL XML

Capture actual plans with SET STATISTICS XML, save the extra result safely, inspect runtime fields, and compare last-known plan statistics.

Read More
Several hands raising wine glasses over a dinner table, clinking every glass against each of the others.

Many-to-Many Merge Join and the Worktable in STATISTICS IO

April 18, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Joins, SQL Performance, SQL Server

Diagnose a many-to-many merge join and its worktable, verify true uniqueness, and compare join choices without changing legitimate matches.

Read More
A small bottle jack supporting a large stone slab with its contact points visible

Plan Properties Window: Where the Useful Numbers Hide

April 15, 2019
Pinal Dave
SQL Tips and Tricks
Execution Plan, Maintenance Plan, SQL Server

The execution plan picture only shows the shape. The properties window shows what really happened, and I walk through it on a tiny example.

Read More
An empty theatre stage is prepared for a performance that has not begun

How to Compile Queries and Not Execute Them? – Interview Question of the Week #219

April 7, 2019
Pinal Dave
SQL Interview Questions and Answers
Execution Plan, SQL Scripts, SQL Server

How do you compile queries and not execute them? SET NOEXEC ON validates the syntax without running the statement, as this simple SSMS example shows.

Read More
A finger nudging one carved bird on a hanging wooden mobile, making every other bird swing.

Wide Update Plans: What Every Extra Index Costs a Write

March 22, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Performance, SQL Server

Inspect wide update plans, compare index-maintenance work with narrow updates, and read per-index counters without misreading STATISTICS IO.

Read More
Previous 1 … 16 17 18 19 20 21 22 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

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