The option to enable Optimize for Ad Hoc Workloads in SQL Server has become one of our most recommended settings. When enabled the Optimize for Ad Hoc Workloads, this setting will command the SQL Server to only store a snippet of the query plan each time a query is executed
Continue readingHow to Enable Optimize for Ad Hoc Workloads in SQL Server 2016