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

  • 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?

  • 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?

  • can you please post the Query.

    is it linked server related query ?

    -----------------------------------------------------------------------------
    संकेत कोकणे

  • 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?

  • 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 🙂

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply