Question

When restoring a database, is there a way to restore the plan cache so it doesn't have to be re-created during production use?

Similar question: is there a way to pro-actively restore the buffer cache during or after a database restore?,…. other than to create and run select statements on the tables previously in the buffer cache, a solution which would be time-consuming to create, and inevitably inaccurate.

This is a followup to this question: "Does restoring database clear buffer cache and stored proc cache". edit: This question is a follow-up because I want to know if there is a workaround to get the plan cache and buffer pool back to their source state.

Was it helpful?

Solution

When restoring a database, is there a way to restore the plan cache so it doesn't have to be re-created during production use?

No. The caches will have to warm up based on use. You can force plans using the Query Store for particular queries if you want, as the Query Store is part of the database, and will be present after Restore.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top