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.

Chapter 5: Indexing Strategy and Maintenance<br />

each usage in counted once. The operational stats object may have multiple values set<br />

for each type of activity recorded. Finally, note that we cannot use APPLY operators <strong>with</strong><br />

this DMF.<br />

Whereas the usage stats give a feel for how an index is used by the optimizer to satisfy the<br />

needs of certain queries, the operational stats offer more detailed information about how<br />

the index is used at a physical level, via columns such as leaf_insert_count, leaf_<br />

update_count and leaf_delete_count (the cumulative number of leaf-level inserts,<br />

updates and deletes), as well as the nonleaf_* equivalents, for modifications above the<br />

leaf level.<br />

For diagnosis of resource contention on the object, the following columns are<br />

particularly useful:<br />

• row_lock_count – number of row locks that have been requested against this index<br />

• row_lock_wait_count – number of times a session has waited on a row lock<br />

against this index<br />

• row_lock_wait_in_ms – amount of time a session had to wait on a row lock against<br />

this index<br />

• page_lock_count, page_lock_wait_count, page_lock_wait_in_ms – same<br />

as row_lock values at the page grain<br />

• index_lock_promotion_attempt_count, index_lock_promotion_count<br />

– number of times the lock grain for an operation using this index was attempted or<br />

granted to be escalated (like from row to page)<br />

• page_latch_wait_count, page_latch_wait_in_ms – number of waits and time<br />

waited on the physical page of the object to have the latch removed<br />

• page_io_latch_wait_count, page_io_latch_wait_in_ms – number of waits<br />

and time while <strong>SQL</strong> loads pages from disk into memory for an index operation.<br />

191

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

Saved successfully!

Ooh no, something went wrong!