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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

13<br />

Introduction<br />

on those objects that, as DBAs, we find most useful in periodic to day-to-day<br />

troubleshooting. We'll describe the most important columns that these DMOs return,<br />

and provide a core set of scripts that can be saved and adapted for your own environment,<br />

to shine some light on previously dark corners of <strong>SQL</strong> <strong>Server</strong> performance optimization.<br />

In the process, we'll cover about a third of the total number of available DMOs, spanning<br />

6 of the available 19 categories of DMO, outlined below.<br />

Execution related – Chapters 2 and 3 show how to investigate the activity generated by<br />

<strong>SQL</strong> statements executed against our <strong>SQL</strong> <strong>Server</strong> instances, and how to establish a chain<br />

of ownership, from the user connections, to the sessions they spawn, to the resulting<br />

requests that generate the <strong>SQL</strong> workload. Chapter 2 focuses on activity that is occurring<br />

right now, on a given instance, and Chapter 3 takes a more historical perspective,<br />

examining CPU, I/O, and memory use by statements for which a plan exists in the cache,<br />

and also investigating critical issues such as plan reuse.<br />

Transaction related – Chapter 4 steps down to the transaction level, showing how<br />

to pinpoint locking and blocking issues, expose open but inactive transactions, and<br />

investigate transactions that are causing substantial transaction log writes. It also<br />

covers those DMOs dedicated to snapshot isolation level, and use of the version store<br />

in tempdb.<br />

Index related – Defining an effective indexing strategy is the best way to ensure that the<br />

most significant and frequent queries in your workload are able to read only the required<br />

data, and in a logical, ordered fashion, thus returning that data quickly and efficiently,<br />

<strong>with</strong> minimal I/O. The DMOs in this category, covered in Chapter 5, are among the most<br />

frequently used by DBAs, and we'll provide scripts for investigating index use, missing<br />

indexes and index fragmentation.<br />

Database related and I/O related – A critical aspect of <strong>SQL</strong> <strong>Server</strong> performance is how<br />

the engine uses the disk I/O subsystem, and the ability of that subsystem to cope <strong>with</strong><br />

the I/O throughput (I/Os per second) demanded by the system workload. Chapter 6<br />

investigates those DMOs that expose I/O activity at the file, database, and even table level,

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

Saved successfully!

Ooh no, something went wrong!