• WOW latches is a very broadbased discussion and sometimes very difficult to explain .

    As the previous replay you had states it is lightweight "locks" ...some people do refer to Lathes as locks but the terminologies have a huge difference.

    Locks can be controlled and ensures transaction integrity ...controlled meaning using different isloation levels, locking hints,lock settings like lock timeout values ...like I said more part of the transaction architecture of sql server ...

    Lathes are lightweight io syncronization objetcs that get's used deep in the sql server relational engine and storage engine . There are not many whitepapers and discussion around lathes and up and till today I still don't understand why ..maybe due to the complexity of the component within the engine.

    EI : when the realtion engine requires data from a storage engine ...it uses a latch in the process of requesting the data and supplying the data (in a nutshell) . The latch is being used to make sure the the data that is being retrieved from the pages are not madified ect . You see why some people say it is a lightweight lock ? ..

    Lathes are also used if database and logfiles extend ...the discussion can go to deep storage engine talks about unified extends and mixed extands ...global allocation maps and sgams ect ....

    You can monitor latches using perfmon ...normally look at latches that waits ...I have been in the situasion recently where I have accessive latch waitimes of 5-6 seconds per latchs and got the latcheing down not using the trace flag 1118 that reduces latch contension but by not autogrowing my databases and log files ..using multiple data files on multiple luns for tempdb ect ..

    Your dba also can look at queries which is a different ball game by itself ..if you want to see that queries can cause excessive latching

    Hope this helps

    W