Optimize for ad-hoc workloads

SQL Server 2008 introduced a new advanced option called “Optimize for ad-hoc workloads”. According to Microsoft: The¬†optimize for ad hoc workloads¬†option is used to improve the efficiency of the plan cache for workloads that contain many single use ad hoc batches. When this option is set to 1, the Database Engine stores a small compiled […]