Log Forced Plans That Automatic Tuning Reverts with XEvents
When a query regresses, automatic plan correction forces the last known good plan and then keeps checking it. The script below creates an Extended Events session that writes each check ending in an unforced plan to an XEL file on disk, one event per reverted correction. Purpose and Overview A plan that automatic plan …
Read MoreCatch Plan Regressions Automatic Tuning Leaves Uncorrected
When the gap between a regressed plan and the last known good plan is not high enough, automatic plan correction in SQL Server leaves the regressed plan in place. The recommendation it records is lost at the next restart. The script below creates an Extended Events session that writes each detected but uncorrected …
Read More