August 15, 2012 at 8:32 am
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
August 15, 2012 at 9:30 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 15, 2012 at 10:55 am
GilaMonster (8/15/2012)
Latch waits means the process has requested a latch on some structure and is waiting for the latch to be grantedLock 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?
August 15, 2012 at 11:00 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 15, 2012 at 12:40 pm
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?
August 15, 2012 at 1:01 pm
Mostly, yes.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply