AFAIK, there's no current way to do so...
Another MS Patch Tuesday with several database server restarts - leading to "emptied" caches - has reminded me of this older product suggestion from the "product futures" newsgroup:
It has also been discussed in comments on the answer of this FAQ.
The basic idea would be to add a facility to re-load the cache contents from the time immediately before the database stop, so applications could continue with the same "hot" cache as before.
Currently, "cache warming" does something similar, however it does use the cache contents from the last database start. So in case you delay a server restart to a timestamp when there are no users (say, nightly), the cache might not get filled by "real usage" at all. (A workaround would be to use some well-thought, application-specific queries that try to fill the cache with reasonable values...)
I just would like to know if such a feature is considered internally in development.
asked 15 Mar '12, 09:01
FWIW, v17 seems to have introduced that topic (as "Cache warming to a steady state"):
(Note: That's just my impression on reading the docs, have not yet tested it, but the general idea would be to issue an ALTER SERVER SAVE CACHE statement before the database is shutdown and add an ALTER SERVER RESTORE CACHE statement when it is re-started...)
I am aware of no concrete plans to support "cache hibernation", in the manner you state above, at this time.
answered 15 Mar '12, 14:26