ASYNC_NETWORK_IO: query is slow

Published 29 August 07 03:00 AM | SQL Master 

When you run normal SELECT statement from the Activity Monitor, the session has a status of "suspended", a command of "SELECT" and a wait type of "ASYNC_NETWORK_IO". What do you expect to the see the results and within the column status, we will see quite a few requests which are in the status ‘suspended’ and some others as ‘running’. The state ‘suspended’ simply means that the request currently is not active because it is waiting on a resource.

If you happen to see this wait type many times and blocking might occur where that client is getting into that status, the other problem it causes is that it "locks" up a table in the database. When this session present in this state, no one can update a particular table in the database - the update query just hangs as if it's waiting on something.  ASYNC_NETWORK_IO is nothing but looks like waiting for network, and also the task is (may be) blocked behind the network. Verify that the client is processing data from the server and better to check the execution plan for those hanging queries.

In addition to this just hang out to see the disk related counters using SYSMON (PERFMON) as it happens due to the slow disk performance causing much locks on performing writes to the disk. In this case that suspended SPID never ends and to see what it is doing DigFurther on that SPID, you might take a decision to kill offending SPID to free up the resources. Though this is not a final solution, you must perform a thorough analysis of hardware, software and queries that are fired against your SQL Server instance. If you are handling bulk imports of data then ensure to perform them during overnight that will reduce stress on the system resources.

When we say 'resources' means that can be an I/O for reading a page, it can be communication on the network, or it simply that other requests are using the CPUs and the request is in the list of the scheduler to become ‘running’ again.  The usual expectation to release that resource depends on the disk and where the wait-type like PAGEIOLATCH_SH indicating disk I/O activity or ASYNCH_NETWORK_IO indicating network communication.  The general rule for better disk I/O activity is mainly reflects the performance of the I/O subsystem. The higher the number the slower the I/O subsystem seems to be. So to obtain the real average time an I/O takes you should take help of SYSMON as suggested before.  Fyi to get more information Waits and Queue BestWhitePaper in web.

 

Comments

# Other SQL Server Blogs around the Web said on August 29, 2007 3:51 AM:

When you run normal SELECT statement from the Activity Monitor, the session has a status of "suspended"

# SSQA.net - SqlServer-QA.net said on August 29, 2007 4:58 AM:

When you run normal SELECT statement from the Activity Monitor, the session has a status of "suspended"

Anonymous comments are disabled

About SQL Master

**__________________________________** SQL Server MVP, Sr. DBA & industry expert. - Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.

Search

Go

This Blog

«August 2007»
SMTWTFS
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678

Syndication