October 15, 2010 at 8:01 am
Is there any way to determine the last time the plan cache was flushed?
Thanks in advance for the help.
October 15, 2010 at 12:09 pm
Except for certain operations the flush the cache, it's pretty much being constantly flushed, depending on the pressure on memory. But, to my knowledge, there's no way to know for sure. One thing you can do though, is run a query against one of the DMOs that uses the cache and look at the creation date for the entry. The oldest one will show you the last time the entire cache was flushed. One example is sys.dm_exec_query_stats.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 15, 2010 at 12:25 pm
Are you looking for a deliberate flush, like a DBCC comment? The default trace might help.
October 15, 2010 at 12:30 pm
Yes, I was looking for a diliberate flush with DBCC FREE...CACHE. Sorry I should have been more specific.
Thanks again for the help.
October 15, 2010 at 2:26 pm
Error log should have an entry for DBCC FREE...CACHE
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply