Skip to content

Query Tuning Week: What’s the Difference Between Locking and Blocking and Deadlocking?

'If Erik takes out a lock on a row,
and no one else is around to hear it,
that’s just locking.

There’s nothing wrong with locking by itself. It’s perfectly fine. If you’re the only person running a query, and you have a lot of work to do, you probably want to take out the largest locks possible (the entire table) in order to get your work done quickly.

You don’t want to monitor for locking – it just happens, and that’s okay. Until…

If Erik takes out a lock on a row,
and shortly thereafter Tara wants that same row,
that’s blocking.
'...

https://www.brentozar.com/archive/2016/08/whats-difference-locking-blocking-deadlocking/?utm_source=Brent+Ozar+Unlimited®+List&utm_campaign=a6739c1f07-RSS_EMAIL_CAMPAIGN&utm_medium=email&utm_term=0_8e3e861dd9-a6739c1f07-296247489

Trackbacks

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.

Kommentar schreiben

Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.
CAPTCHA

Formular-Optionen