SQL optimization Archives - SQLOPS https://www.sqlops.com The Most Advanced Data Management Company Mon, 22 Apr 2024 17:23:21 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.6 https://i0.wp.com/www.sqlops.com/wp-content/uploads/2018/08/cropped-SQLOPS_Favicon.jpg?fit=32%2C32&ssl=1 SQL optimization Archives - SQLOPS https://www.sqlops.com 32 32 151967784 Optimize for Ad Hoc Workload in SQL Server https://www.sqlops.com/optimize-for-ad-hoc-workload/ Sun, 19 Sep 2021 00:53:03 +0000 https://sqlops.com/?p=3767 By default, when a query is executed in SQL Server, it compiles and generates an execution plan and stores it in the plan cache. If this is a one-off or ad-hoc query that will never be run again, then the newly generated plan is wasted and its space that is being used in the plan cache is also wasted. This means the buffer pool now contains compiled plan of queries that will never be executed.

The post Optimize for Ad Hoc Workload in SQL Server appeared first on SQLOPS.

]]>
3767