
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
Categories:
2 minute read
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
- Open a query window on the database concerned.
- Turn on “Include Actual Execution Plan”, with the toolbar button or
Ctrl+M. - Run the query or the stored procedure, with the parameter values of interest.
- In the “Execution plan” tab, right-click the plan, choose “Save Execution
Plan As…”, and save a
.sqlplanfile.
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.
The query really runs, with its duration and its load on the server. If it has already run for hours, or if it modifies data, let’s talk first.
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.
To send them, I can give you an upload link on transfer.pachadata.com, my file
transfer service: open it in a browser and drop the files, with no account to
create. The link only lets you send me files, nobody else can download them,
and it expires after a few days.
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/