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 Administration
 SQL running slow since big query was run

Author  Topic 

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2011-11-29 : 19:37:01
Our SQL is running slow when you run some views or print invoices.
The CPU usage goes up dramatically. I think this started after running a very big query which took 1hr 9 min to run and returned 27,000,000 rows. Since then the query runs for hours and hours (6 hrs plus)and I have never allowed it to complete.

I would appreciate it if some one could give me any clues as to what you think this might be. I have restarted the sever and SQL several times.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-29 : 22:20:43
No one can process that many rows, so why return them to a user? A giant query like that will affect memory and CPU, thus slowing down everything on that instance and potentially the server.

You need to fix your query.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2011-11-30 : 04:31:46
The query has finished runing. The query is written to break down a pricing matrix to load up to our web. I am using SSIS package export to a tab delimited file then zipping up and sending it to an ftp site.

Do you think that enven though the query has finish it may have effected something?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-30 : 19:57:16
Are you saying that performance is still slow hours after it completed?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2011-11-30 : 20:01:47
If it is easy to do (i.e. won;t impact users) then Stop/Start SQL Service should sort you out.

But that's just a band-aid, so if you want to find the cause though don't do that!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-01 : 00:40:50
quote:
Originally posted by Kyle Doouss

The query has finished runing. The query is written to break down a pricing matrix to load up to our web. I am using SSIS package export to a tab delimited file then zipping up and sending it to an ftp site.

Do you think that enven though the query has finish it may have effected something?


it was a select query right? was it using too many temporary tables? was there any other processes running in parallel?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -