patternsqlMinor
query plan caching (sql server)
Viewed 0 times
sqlquerycachingplanserver
Problem
Is there a measure of time frame as to which the execution plan of inline queries will cached?
Solution
There is an algorithm (will find it), but practically it will stay there:
SQL Server 2008 article
- while being used (Edit: See AdaTheDev's answer)
- until statistics update (also implied by index rebuild)
- until definition changes (including whitespace and case)
- SQL instance restart
- until severe memory pressure
SQL Server 2008 article
Context
StackExchange Database Administrators Q#11701, answer score: 6
Revisions (0)
No revisions yet.