Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

clearing SQL cache Expand / Collapse
Author
Message
Posted Tuesday, April 6, 2010 10:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 15, 2013 8:31 AM
Points: 1, Visits: 11
Hello,
We have our application running on sql server 2005. Recently we started slowing down of the database and timeouts. Once we clear the SQL cache, it turns normal again. What all can be the causes of this issue we are facing. And what can we do to avoid this. Please help!
Post #898151
Posted Wednesday, April 7, 2010 1:22 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 3:24 PM
Points: 17,812, Visits: 15,737
Are you getting any error messages along with the slowdown or are you just experiencing general slowness? Are you seeing application timeouts?



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #898233
Posted Wednesday, April 7, 2010 1:31 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 2:06 AM
Points: 1,768, Visits: 8,318
Do you mean the procedure cache (DBCC FREEPROCCACHE) or the buffer cache(DBCC DROPCLEANBUFFERS) ?

Im guessing the former, could potentially be parameter sniffing http://www.sqlpointers.com/2006/11/parameter-sniffing-stored-procedures.html




Clear Sky SQL
My Blog
Kent user group
Post #898240
Posted Wednesday, April 7, 2010 6:29 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 10:42 AM
Points: 6,731, Visits: 8,480
What service pack is your sql2005 on ?

Please post the result of
select @@version 

or
Select Serverproperty( 'ProductVersion' ) as ProductVersion 
, Serverproperty( 'ProductLevel' ) as ProductLevel
, Serverproperty( 'ResourceLastUpdateDateTime' ) as ResourceLastUpdateDateTime
, Serverproperty( 'ResourceVersion' ) as ResourceVersion
, Serverproperty( 'Edition' ) as Edition
, Serverproperty( 'EditionID' ) as EditionID

What action did you perform to "clear the cache" ?


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #898417
Posted Wednesday, April 7, 2010 6:32 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
Dave Ballantyne (4/7/2010)
Do you mean the procedure cache (DBCC FREEPROCCACHE) or the buffer cache(DBCC DROPCLEANBUFFERS) ?

Im guessing the former, could potentially be parameter sniffing http://www.sqlpointers.com/2006/11/parameter-sniffing-stored-procedures.html

I like guessing games
My guess is procedure cache bloat due to ad-hoc queries.
http://blogs.msdn.com/sqlprogrammability/archive/2007/01/23/4-0-useful-queries-on-dmv-s-to-understand-plan-cache-behavior.aspx
DBCC FREESYSTEMCACHE('SQL Plans');




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #898419
Posted Wednesday, April 7, 2010 11:01 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 3:24 PM
Points: 17,812, Visits: 15,737
vkkrishn,
Do you have any of the information / answers for the questions asked?




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #898781
Posted Wednesday, April 7, 2010 3:07 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 2:06 AM
Points: 1,768, Visits: 8,318
Paul White NZ (4/7/2010)
My guess is procedure cache bloat due to ad-hoc queries.


Which reminds me , ive still got a half finished blog on forced parametrization hanging around.




Clear Sky SQL
My Blog
Kent user group
Post #899023
Posted Wednesday, April 7, 2010 6:34 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
Dave Ballantyne (4/7/2010)
Paul White NZ (4/7/2010)
My guess is procedure cache bloat due to ad-hoc queries.

Which reminds me , ive still got a half finished blog on forced parametrization hanging around.

Well get on with it then!!!





Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #899172
Posted Friday, April 9, 2010 10:23 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, December 2, 2011 7:44 AM
Points: 37, Visits: 150
vkkrishn (4/6/2010)
Hello,
We have our application running on sql server 2005. Recently we started slowing down of the database and timeouts. Once we clear the SQL cache, it turns normal again. What all can be the causes of this issue we are facing. And what can we do to avoid this. Please help!


We ran into this exact situation not long ago, and what I found was SQL created different cached execution plans based on the parameters we were passing into a procedure, and in some cases the cached execution plan, though ran speedy for some parameters ran very inefficiency with other parameters.

Once I found the troublesome procedure my fix was to view the execution plan and create a few indexes so the same, more efficient cached execution plan was created regardless of parameters used, which worked.

The first thing you need to do is determine what process is taking the longest to run. You may be able to monitor your processes and see which ones are taking a long time to run and go from there.

Let me know if you need more details and I can send you some of what we did to find the troublesome procedure then remedy the latency.

Take care --

Sam
Post #900697
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse