SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


very high CPU, 0 I/O, no blocking, NULL in wait type? What could be possibly going wrong?


very high CPU, 0 I/O, no blocking, NULL in wait type? What could be possibly going wrong?

Author
Message
curious_sqldba
curious_sqldba
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2972 Visits: 3637
I have a select query which is in a "hung" state. I checked there is no blocking. From the activity monitor i see that Wait type is NULL. I do see very very high CPU and 0 on I/O. What could be wrong? Any advice?
Jack Vamvas
Jack Vamvas
Valued Member
Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)

Group: General Forum Members
Points: 59 Visits: 329
Has this query been regularly as OK? or is it a new query?
Are the statistics up to date?
Have you checked sys.dm_exec_requests for more detailed information?

Jack Vamvas
sqlserver-dba.com
sanket kokane
sanket kokane
SSC-Addicted
SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)SSC-Addicted (481 reputation)

Group: General Forum Members
Points: 481 Visits: 1022
can you please post the Query.

is it linked server related query ?

-----------------------------------------------------------------------------
संकेत कोकणे
Markus
Markus
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3057 Visits: 3778
Find out which SPID it is using and do a SP_WHO2 xxx where xxx is the SPID of the running query. Run this a few times to see if the CPU and I/O are increasing.

Also, do an explain plan on it to see if it is using indexes or table scans. Then see if you can add tuning indexes to make it run more efficiently.

Also, change the SELECT statement to SELECT COUNT(1) to see if it will, somewhat quickly tell you how many rows it should return. Does it return 1 row, 500 rows, 20 million....

Other questions....

Has this query run before... on a regular basis... did it run quickly before and all of a sudden gone crazy.

How big is the table(s), are stats up-to-date... could reindexing the tables be an option?



SQLQuest29
SQLQuest29
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1094 Visits: 4324
sqldba_newbie (10/31/2012)

I have a select query which is in a "hung" state. I checked there is no blocking. From the activity monitor i see that Wait type is NULL. I do see very very high CPU and 0 on I/O. What could be wrong? Any advice?


you can do .. select * from sys.dm_os_waiting_Tasks and join with sys.dm_exec_requests and sys.dm_exec_sessions to see whats going on ..

Also, Adam Mechanic's sp_whoIsActive is another good stuff that will tell u whats going on currently.

without giving more info about your environment and what steps u have taken to troubleshoot, its very difficult to help you.

______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor :-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search