Skip to Content
Professional SQL Server® 2005 Performance Tuning
book

Professional SQL Server® 2005 Performance Tuning

by Steven Wort, Christian Bolton, Justin Langford, Michael Cape, Joshua J. Jin, Douglas Hinson, Haidong Ji, Paul A. Mestemaker, Arindam Sen
January 2008
Intermediate to advanced
575 pages
16h 10m
English
Wrox
Content preview from Professional SQL Server® 2005 Performance Tuning

9.9. Tuning for Deadlocking and Blocking

Chapter 4 covers the topics of blocking and deadlocking, including techniques for capturing and recognizing blocks and deadlocks are described. This section discusses techniques and practices for handling these events.

9.9.1. Blocking

Before proceeding a brief review of blocking is needed. Blocking isn't necessarily a problem. It occurs regularly during the normal operation of a database. A typical scenario for blocking occurs when one user who's updating a data page prevents another user from accessing that page at the same time. When this happens the second user is blocked for a few moments until the first user completes the change and releases the page. This isn't the issue that causes performance degradation. The performance-robbing blocks are the ones that last for more than a few moments — a lot more. Imagine standing in line at a grocery store checkout. The line is moving well. The customers are steadily progressing through the line when the cashier has to stop the process and get a price check on an item. At this point everyone in the line is stopped or blocked until the price check is completed. This is the type of blocking that needs to be minimized.

In order to aid your investigation of blocking, SQL Server has provided some DMVs that are useful. Specifically, the sys.dm_os_wait_stats and sys.dm_os_waiting_tasks are particularly handy. See Chapter 4 for a more thorough description of these DMVs as well as other blocking tools. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Professional Microsoft® SQL Server® 2008 Programming

Professional Microsoft® SQL Server® 2008 Programming

Rob Vieira, Mahsa Nakhjiri
Professional SQL Server® 2008 Internals and Troubleshooting

Professional SQL Server® 2008 Internals and Troubleshooting

Christian Bolton, Justin Langford, Brent Ozar, James Rowland-Jones, Jonathan Kehayias, Cindy Gross, Steven Wort

Publisher Resources

ISBN: 9780470176399Purchase book