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.
Compiled Parameter Values in SQL Server: Read Them From the Cache
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.
Capturing Actual Execution Plans From a Script With SET STATISTICS XML
Capture actual plans with SET STATISTICS XML, save the extra result safely, inspect runtime fields, and compare last-known plan statistics.
Many-to-Many Merge Join and the Worktable in STATISTICS IO
Diagnose a many-to-many merge join and its worktable, verify true uniqueness, and compare join choices without changing legitimate matches.
Plan Properties Window: Where the Useful Numbers Hide
The execution plan picture only shows the shape. The properties window shows what really happened, and I walk through it on a tiny example.
How to Compile Queries and Not Execute Them? – Interview Question of the Week #219
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.
Wide Update Plans: What Every Extra Index Costs a Write
Inspect wide update plans, compare index-maintenance work with narrow updates, and read per-index counters without misreading STATISTICS IO.







