Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL running really slow...

Author  Topic 

Topaz
Posting Yak Master

199 Posts

Posted - 2008-10-07 : 04:53:00
Im not sure if this is the right section to post in about a technical issue. So my apologies if it is in the wrong section.

Over the past few weeks now, out sql server has been running extremely slow. When we check the performance of the server it keeps peeking at 100% cpu usage every now and then.

Im just wondering if there is some kind of cache that i need to clear for it to become stable again? or is there a simple diagnostic tool that will point out all the errors?

I appreciate your help...

JT

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-10-07 : 09:10:49
You could be suffering from one or more of many problems.

memory leak.....re-start server and hope to buy time before the leak comes back.
fragmentation...reindex/defrag databases/tables
no indices......profile the code and look for poor performing elements (tables/code)
locking.........profile the server and look for locks.
volume..........maybe your application/server has grown beyond its capabilities...investigate new hardware.

start with making a small fix and see it's effect. look for the highest return on your investment in each action. search here for other advice of this issue. doing nothing is generally not a valid answer. good luck!
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-10-07 : 09:12:33
Run profiler for a while with the SQL:Batch completed and RPC:Completed events.
Load the trace into a table somewhere (a test or personal server) and look for queries with high CPU usage
Go through the top 5 and see if you can tune them. This may involve rewriting the code, changing indexes or both.
There's usually no quick-fix to performance problems.

You can also try rebuilding all the indexes on the server (during quiet time). If they're badly fragmented, it may be a cause.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-07 : 09:14:55
If you are in SQL 2005, you can also see top 5 CPU intensive queries with standard reports.
Go to Top of Page
   

- Advertisement -