Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Understanding Latches\Locks Expand / Collapse
Author
Message
Posted Wednesday, August 15, 2012 8:32 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 3:20 AM
Points: 1,375, Visits: 2,661
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
Post #1345301
Posted Wednesday, August 15, 2012 9:30 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:58 PM
Points: 42,466, Visits: 35,532
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

Post #1345348
Posted Wednesday, August 15, 2012 10:55 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 3:20 AM
Points: 1,375, Visits: 2,661
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?
Post #1345403
Posted Wednesday, August 15, 2012 10:59 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:58 PM
Points: 42,466, Visits: 35,532
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

Post #1345405
Posted Wednesday, August 15, 2012 12:40 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 3:20 AM
Points: 1,375, Visits: 2,661
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?



Post #1345467
Posted Wednesday, August 15, 2012 1:01 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:58 PM
Points: 42,466, Visits: 35,532
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

Post #1345489
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse