Optimize for Ad Hoc Workload in SQL Server

Optimize for Ad Hoc Workload in SQL Server

When a query is executed, it compiles and generates an execution plan and stores it in the plan cache. If this is a one time query that will never be run again, then the newly generated plan and space in plan cache are wasted. This means the buffer pool now contains a...