SQL Server Interview Question #213
What is the SQL Server plan cache?
Advanced Query Optimization Senior Advanced
Detailed Explanation
SQL Server can cache compiled execution plans so later executions of the same or compatible statements can reuse them instead of paying compilation cost every time.
Plan reuse is generally beneficial, but cached plans can sometimes be inappropriate for later parameter values or changing data distributions. Excessive ad-hoc query text can also produce many single-use plans.
Plan-cache troubleshooting should be evidence-based. Clearing the entire cache is disruptive and usually not an appropriate routine solution.