Click here to monitor SSC
Av rating:
Total votes: 8
Total comments: 4


Performance Tuning with SQL Server Dynamic Management Views
14 June 2010

Performance Tuning with SQL Server DMVs, by Tim Ford and Louis Davidson

This is the book that will de-mystify the process of using Dynamic Management Views to collect the information you need to troubleshoot SQL Server problems. It will highlight the core techniques and "patterns" that you need to master, and will provide a core set of scripts that you can use and adapt for your own requirements.

The book is available to buy from Amazon.com and Amazon.co.uk.

Free EPUB version available to download for Simple-Talk site members here.

Why read this book?

Dynamic Management Views (DMVs) are a significant and valuable addition to the DBA's troubleshooting armory, laying bare previously unavailable information regarding the under-the-covers activity of your database sessions and transactions.

Why, then, aren't all DBAs using them? Why do many DBAs continue to ignore them in favour of "tried and trusted" tools such as sp_who2, DBCC OPENTRAN, and so on, or make do with the "ready made" reports built into SSMS? Why do even those that do use the DMVs speak wistfully about "good old sysprocesses"?

There seem to be two main factors at work. Firstly, some DBAs are simply unaware of the depth and breadth of the information that is available from the DMvs, or how it might help them troubleshoot common issues. This book investigates all of the DMVs that are most frequently useful to the DBA in investigating query execution, index usage, session and transaction activity, disk IO, and how SQL Server is using or abusing the operating system.

Secondly, the DMVs have a reputation of being difficult to use. In the process of exposing as much useful data as possible, sysprocesses has been de-normalized, and many new views and columns have been added. This fact, coupled with the initially-baffling choices of what columns will be exposed where, has lead to some DBAs to liken querying DMVs to "collecting mystic spells".

In fact, however, once you start to write your own scripts, you'll see the same tricks, and similar join patterns, being used time and again. As such, a relatively small core set of scripts can be readily adapted to suit any requirement. This book is here to de-mystify the process of collecting the information you need to troubleshoot SQL Server problems. It will highlight the core techniques and "patterns" that you need to master, and will provide a core set of scripts that you can use and adapt for your own systems, including how to:

  • Root out the queries that are causing memory or CPU pressure on your system
  • Investigate caching, and query plan reuse
  • Identify index usage patterns
  • Track fragmentation in clustered indexes and heaps
  • Get full details on blocking and blocked transactions, including the exact commands being executed, and by whom.
  • Find out where SQL Server is spending time waiting for resources to be released, before proceeding
  • Monitor usage and growth of tempdb

The DMVs don't make existing, built-in, performance tools obsolete. On the contrary, they complement these tools, and offer a flexibility, richness and granularity that are simply not available elsewhere. Furthermore, you don't need to master a new GUI, or a new language in order to use them; it's all done in a language all DBAs know and mostly love: T-SQL.

About the Author

Louis Davidson has been in the IT industry for 15 years as a corporate database developer and data architect. Currently he is the Data Architect for Compass Technology in Chesapeake, Virginia, supporting the Christian Broadcasting Network and NorthStar Studios in Nashville, Tennessee. Louis has been a Microsoft MVP since 2004, and is an active volunteer for the Professional Association for SQL Server working in their Special Interest Groups. He is the author of SQL Server 2005 Database Design and Optimization.

Tim Ford is a senior database administrator with Spectrum Health in Grand Rapids, Michigan. He has been an active volunteer with The Professional Association for SQL Server (PASS) since 2002 and a certified solutions developer (MCSD) since 2001. Currently he is attempting to teach himself web development at www.ford-it.com. In his free time he usually has a camera, game controller, spatula, guitar, handlebars, book, or beer in his hands. His wife and two young sons, Austen and Trevor keep him sane when not driving him completely crazy.



This article has been viewed 9660 times.
Louis Davidson and Tim Ford

Author profile: Louis Davidson and Tim Ford

Louis Davidson has been in the IT industry for 15 years as a corporate database developer and data architect. Currently he is the Data Architect for Compass Technology in Chesapeake, Virginia, supporting the Christian Broadcasting Network and NorthStar Studios in Nashville, Tennessee. Louis has been a Microsoft MVP since 2004, and is an active volunteer for the Professional Association for SQL Server working in their Special Interest Groups. He is the author of SQL Server 2005 Database Design and Optimization.
Tim is a SQL Server MVP, and has been working with SQL Server for over ten years. He is the co-founder of SQL Cruise, LLC, a training company for SQL Server specializing in deep-dive sessions for small groups, hosted in exotic and alternative locations throughout the world. He is also a Senior SQL Server Professional for Next Wave Logistics, Inc. and is the owner and Lead Consultant for B-Side Consulting, LLC. He's been writing about technology since 2007 for a variety of websites and maintains his own blog at http://thesqlagentman.com/ covering SQL as well as telecommuting and professional development topics. Tim is an established SQL Server Community Speaker and long-term volunteer in the technical community, having held positions in the Professional Association for SQL Server (PASS) since 2002.He has also been leading the West Michigan SQL Server User Group (WMSSUG) since 2008. When not neck-deep in technology, Tim spends his time travelling with his wife, Amy and sons, Austen and Trevor, be it to Alaska or simply to one of Trevor’s tennis practices or Austen’s Boy Scout meetings. Tim is passionate about photography, cooking, music, gaming, and exercise, and either experiences or writes about them often.

Search for other articles by Louis Davidson and Tim Ford

Rate this article:   Avg rating: from a total of 8 votes.


Poor

OK

Good

Great

Must read
 
Have Your Say
Do you have an opinion on this article? Then add your comment below:
You must be logged in to post to this forum

Click here to log in.


Subject: book link
Posted by: okz (view profile)
Posted on: Sunday, August 15, 2010 at 8:29 PM
Message: where is the beef?

Subject: book link
Posted by: lgaller (view profile)
Posted on: Monday, August 16, 2010 at 5:46 AM
Message: Agreed, How do we access the book?

Subject: Can I get an electronic version of this book?
Posted by: Nick.Ryan (view profile)
Posted on: Monday, October 11, 2010 at 5:36 PM
Message: Living at the end of the Earth, as I do, it takes a while to get my hands on a book like this. I would prefer a copy I can load on my Ipad and download now. Is it available electronically?

Subject: Eagerly Waiting for the book in Hand
Posted by: pzhu1968 (view profile)
Posted on: Friday, December 10, 2010 at 12:01 PM
Message: Eagerly Waiting for the ebook available for downloading.

 



recommended site pinvoke

PInvoke.net is a user-driven wiki which provides .NET developers with native method signatures, so they don't have to spend time writing them from scratch.




Top rated articles
Captain Biplane: Interplanetary Airman
 Simple-Talk caters for the lighter side with its publication of 'Captain Biplane: Interplanetary... Read more...

Don't Just Roll the Dice - eBook Download
 Neil Davidson has created a short handbook with the theory, practical advice and case studies, to... Read more...

Defensive Database Programming
 Inside this book, you will find dozens of practical, defensive programming techniques that will improve... Read more...

Simple Talk Newsletter
 As an experiment, we are publishing the newsletter in an alternative eBook format so that it can be... Read more...

SQL Server Tacklebox
 Inside the SQL Server Tacklebox you'll find day-to-day tools, scripts and techniques to automate and... Read more...

Most viewed articles
Exchange 2010 - A Practical Approach
 Jaap's Practical Guide to Exchange Server 2010 draws upon all that experience to deliver an easy-to-use... Read more...

Brad's Sure Guide to SQL Server Maintenance Plans
 Brad's Sure Guide to Maintenance Plans shows you how to use the Maintenance Plan Wizard and Designer to... Read more...

Inside the SQL Server Query Optimizer
 This book will take you from the fundamentals of Statistics, Cost Estimation, Index Selection, and the... Read more...

SQL Server Hardware
 SQL Server Hardware will provide the fundamental knowledge and resources you need to make intelligent... Read more...

Simple Talk Newsletter
 As an experiment, we are publishing the newsletter in an alternative eBook format so that it can be... Read more...

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.

Join Simple Talk