|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 8:22 AM
Points: 1,258,
Visits: 2,232
|
|
Hi All
I'm trying to understand Latch\Lock Waits in SQL Server
If I am seeing waits with a wait type of %latch%
Does this mean that a process is waiting to place a Latch on a resource or is that a process is waiting on a resource that currently has a latch on it?
If I am seeing waits with a wait type of %LCK%
Does this mean that a process is waiting to place a Lock on a resource or is that a process is waiting on a resource that currently has a Lock on it?
I'm struggling to understand this
Thanks
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 4:08 PM
Points: 38,099,
Visits: 30,392
|
|
Latch waits means the process has requested a latch on some structure and is waiting for the latch to be granted Lock waits means the process has requested a lock on some structure and is waiting for the lock to be granted
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 8:22 AM
Points: 1,258,
Visits: 2,232
|
|
GilaMonster (8/15/2012) Latch waits means the process has requested a latch on some structure and is waiting for the latch to be granted Lock waits means the process has requested a lock on some structure and is waiting for the lock to be granted
Thanks
The cause of the actual wait could be anything, right? It doesn't mean that something already has a latch on the resource and therefore other processes have to wait to put a latch on the same resource. Is this right?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 4:08 PM
Points: 38,099,
Visits: 30,392
|
|
No, it means exactly that.
Latch waits will be because another process has an incompatible latch already granted (usually, there are other latch waits for other reasons) Lock waits will be because another process has an incompatible lock already granted.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 8:22 AM
Points: 1,258,
Visits: 2,232
|
|
GilaMonster (8/15/2012) No, it means exactly that.
Latch waits will be because another process has an incompatible latch already granted (usually, there are other latch waits for other reasons) Lock waits will be because another process has an incompatible lock already granted.
Thanks
there are other latch waits for other reasons
Is this where PageIOLatches come in?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 4:08 PM
Points: 38,099,
Visits: 30,392
|
|
Mostly, yes.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|