30.06.2013 Views

Performance Tuning with SQL Server Dynamic Management Views

Performance Tuning with SQL Server Dynamic Management Views

Performance Tuning with SQL Server Dynamic Management Views

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

269<br />

Chapter 7: OS and Hardware Interaction<br />

and CPU-intensive than we would hope. In this particular case, the max degree of<br />

parallelism option is set to 2, in an attempt to maximize throughput but give those<br />

poorly performing queries a bit of a performance boost. Ideally, of course, these queries<br />

would be optimized, but they are the product of a third-party system that we can't touch,<br />

and it has a habit of generating queries that are ten pages long.<br />

CXPACKET waits and latch classes<br />

CXPACKET waits are often associated <strong>with</strong> the occurrence of latches of the type ACCESS_METHODS_<br />

SCAN_RANGE_GENERATOR. We'll discuss this further in a later section, Investigating Latching.<br />

The third wait type on our list ASYNC_NETWORK_IO, is described in<br />

Books Online as:<br />

Occurs on network writes when the task is blocked behind the network. Verify that the client is processing<br />

data from the server.<br />

This wait type occurs when sending data back to the client over the network. Often,<br />

these waits simply mean that the client is slowly fetching rows as it works on them,<br />

rather than fetching all rows into cache and disconnecting (at least logically, using<br />

connection pooling). It can also indicate a slow/unreliable network that needs to be<br />

upgraded. Although this wait type caused an order of magnitude fewer waits than<br />

CXPACKET, it will certainly merit further investigation.<br />

Not included in our output here, but worth looking out for nevertheless, are<br />

SOS_SCHEDULER_YIELD waits, described in Books Online as:<br />

Occurs when a task voluntarily yields the scheduler for other tasks to execute. During this wait the task is<br />

waiting for its quantum to be renewed.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!