Clean up the “adhoc plan cache” in SQL Server 2005

I found that the "adhoc cache plan" in my SQL Server 2005 occupies more than 1000MB memory.

There is a solution on SQL Server 2008 that could solve the adhoc plan by setting the "optimize the adhoc", but it does not exists in SQL Server 2005? Have ideas of how to clean up the adhoc plan in SQL Server 2005?


You can use DBCC FREESYSTEMCACHE('SQL Plans'); to drop the cached plans for adhoc queries while leaving stored procedure plans alone.

Need Your Help

Limitations of PyTuple_SetItem

python c python-c-api python-c-extension

I have a Python extension module which creates a tuple as an attribute of another object, and sets items in the tuple. Whenever I execute this module in Python, I keep getting the error SystemErro...

Strongly typed events in Haskell

events haskell serialization aggregateroot event-sourcing

I'm working on my first 'real' Haskell project, and simultaneously trying to get my head around event sourcing. (It seemed like a good match; event sourcing is a rather functional way of looking at