Skip to content

Commit 4704901

Browse files
committed
20260413 readme info about last actual plans
Adding info about how to enable last actual plans.
1 parent 8d7a6ae commit 4704901

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,13 @@ Output columns include:
155155
* Warnings - problems we found.
156156
* Created At - when the plan showed up in the cache.
157157
* Last Execution - maybe the query only runs at night.
158-
* Query Plan - click on this, and the graphical plan pops up.
158+
* Query Plan - click on this, and the graphical plan pops up.
159+
160+
By default, SQL Server caches the estimated plan only. If you want the most recent actual query plan, you can enable the database-level option for last query plan stats with the following statement, but that does come with a CPU performance overhead, especially on database servers that run thousands of batch requests per second.
161+
162+
```tsql
163+
ALTER DATABASE SCOPED CONFIGURATION SET LAST_QUERY_PLAN_STATS = ON;
164+
```
159165

160166
### Common sp_BlitzCache Parameters
161167

0 commit comments

Comments
 (0)