Microsoft Certified IT Professional Rudi Bruchez EI Microsoft Certified IT Professional

Rudi Bruchez EI · www.pachadata.com · rudi@pachadata.com · +33 6 22 48 76 99
Consulting, audit, performance tuning, solutions, training
SQL Server OLTP and BI / NoSQL

Version of December 2, 2026 (c6fa688c) · https://www.pachadata.com/en/services/client-instructions/actual-execution-plan/

Capturing an actual execution plan

Get the actual execution plan of a SQL Server query, with the number of rows each operator really processed, and send it to me.

The Query Store and the plan cache keep only estimated execution plans: what the optimizer planned, not what actually happened at run time. To understand why a query is slower than expected, you need the actual execution plan (the plan after execution). For each operator, it holds the number of rows actually read and the number of executions, and for the query the duration, the CPU time, the memory granted and the spills to tempdb.

As with the database clone, a plan contains values: the literals written in the query and the parameter values. It does not contain any result row.

Getting the plans

  1. Open a query window on the database concerned.
  2. Turn on “Include Actual Execution Plan”, with the toolbar button or Ctrl+M.
  3. Run the query or the stored procedure, with the parameter values of interest.
  4. In the “Execution plan” tab, right-click the plan, choose “Save Execution Plan As…”, and save a .sqlplan file.

A stored procedure with several statements produces one plan per statement, one below the other in the tab. Save the one or ones I asked for, one file per plan.

Sending the plans

Send me the .sqlplan files as they are, zipped if you like. Give each one a name that says what it holds (the query, the parameter value, the duration observed), especially if you capture several.

Contact

I have been an independent SQL Server consultant since 2006. I help when an application slows down, when a server costs too much in storage or licenses, or when a migration must not stop production: audit and diagnosis, query and index tuning, migrations, high availability, training. On site, or as a remote audit delivered in five working days.

rudi@pachadata.com · +33 6 22 48 76 99 · www.pachadata.com/en/contact/