Home Forums SQL Server 2005 Administering very high CPU, 0 I/O, no blocking, NULL in wait type? What could be possibly going wrong? RE: very high CPU, 0 I/O, no blocking, NULL in wait type? What could be possibly going wrong?

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