Forced plans on readable secondaries
20
votes
1
answer
1394
views
If a plan is forced on the primary in an Availability Group, is it applied to queries run on a secondary?
I'm looking for answers that cover both possibilities for plan forcing:
* Plan Guides
* Query Store Forced Plan
I have read the following that suggest QS forced plans do not carry over, but cannot find anything authoritative in the documentation, or anything about plan guides.
* Query Store and Availability Groups by Erin Stellato
* Query Data Store Forced Plan behavior on AlwaysOn Readable Secondary by Vikas Rana
Conclusive evidence of forcing would be the presence of
Use Plan
or PlanGuideName
and PlanGuideDB
properties in the secondary's execution plan.
Asked by Paul White
(95115 rep)
Aug 29, 2019, 10:54 PM
Last activity: Aug 29, 2023, 11:56 AM
Last activity: Aug 29, 2023, 11:56 AM