Wednesday, March 28, 2012

long query

My SQL server blocking for a while
After monitoring with SQL Profiler I found a lot of interesting situation:

query duration is 2045607 msec (=34 min)
CPU usage is 0 msec, number of reads is 3 and number of writes is 0

Where could be a bottleneck ?

Query is tooooooooo long but resorces usage seems to be OK.

Help... SOS ...What about locking?|||Originally posted by snail
What about locking?

It looks with no locks|||Post the query, please.

blindman|||Originally posted by blindman
Post the query, please.

blindman

This is one of many querys with long response

SELECT PPKZIP ,POPZIP ,Zupanija FROM AVEZIP ORDER BY PPKZIP ASC|||Originally posted by valentini
This is one of many querys with long response

SELECT PPKZIP ,POPZIP ,Zupanija FROM AVEZIP ORDER BY PPKZIP ASC

Nr of rows ?
DDL of the table ?
Any index ?|||Originally posted by fadace
Nr of rows ?
DDL of the table ?
Any index ?

Rows about 300
Index on first field - PPKZIP
Table with 3 fields|||Are you seriously saying that it is taking 34 minutes for SQL server to sort 300 rows on an indexed column?

Are there any other processes running? Check the database activity and check the status of any scheduled jobs.

How many users are on the system while this is happening?|||Originally posted by blindman
Are you seriously saying that it is taking 34 minutes for SQL server to sort 300 rows on an indexed column?

Are there any other processes running? Check the database activity and check the status of any scheduled jobs.

How many users are on the system while this is happening?
No scheduling jobs and no special database activity.
As you can see CPU is not used (0 msec)
But after 30 min SQL response with packet of data
Possible from cached memory.

But after 30 min ..............
Is there maybe problem in conlfict with some other transaction
problem with TCP/IP or with physical RAM

...|||What happens if you run the same statement directly from Query Analyzer on the database server?

No comments:

Post a Comment