SQL Server Plan Cache

585 pts.
Tags:
Cache
Cache Mode
SQL
SQL 2005
SQL performance
SQL Server
There is a bucket in plan cache with 75 objects in it and it is the same sql statement. Other than using DBCC FREEPROCCACHE what will clear out the cache? Restarting SQL SERVER Service? I use the code below to look up how many plans are in a bucket.

SELECT   bucketid,   entries_in_bucket = COUNT(*) FROM sys.dm_exec_cached_plans GROUP BY bucketid ORDER BY 2 DESC



Software/Hardware used:
SQL SERVER 2005

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can flush the cache using DBCC, or restarting the SQL Server. If you do an sp_recompile on the object being queried then you will mark all the plans for that object as invalid. You can also change a server wide setting which will flush the cache.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following