IT Answers » Query plan Sat, 27 Dec 2014 03:44:47 +0000 en-US hourly 1 Flush the query plan from the RAM. Thu, 27 Mar 2008 14:57:05 +0000 Our clients are reporting that the sql server is slowing down over a period of time. Once the SQL Server is restarted
everything is fine.SQL server slowing down over a period of time though has technical reasons. SQL server caches (in memory) the queries that are sent it to, expecting to reuse it if the same query is sent again. Over a period of time this cache builds up (and the memory) to a point where it reaches the RAM limit. After this it starts to use the hard disk for memory (virtual memory) which is slower. Restarting the sql server will clear the cache thereby speeding up the server. This problem is partly to do with how SQL server is designed and mostly with application design. SQL Server 2005 SP2 is supposed to address this cache bloating problem. A poorly designed SQL query will never get reused but they just bloat the cache. Rewriting these queries to be reused will make caching more effective. I have a set of queries which I believe that are causing the RAM to bloat.Most of the queries are Select statements, How can I effectively rewrite these queries so that
they are flushed out of the RAM each time after they are used?

]]> 1