Posts

Showing posts with the label Latch Coupling

SQL Server, Difference between a seek and a scan operation and the Latch coupling

Image
Hi Guys, During my last post i blogged about buffer latch (*) and the Last page insert latch contention problem . (*) What is a Latch? ...As written in my previous post, which I recommend to read: Latches are synchronization primitives that are used by SQL Server to manage data concurrency and guarantee consistency of its in-memory structures like index, data pages and internal structures, such as non-leaf pages in a B-Tree. Since it is very important to understand how latches work, today i will try to deepen. I will try to be as clear as possible even if the topic is not the simplest. We will also understand what is the difference is between a seek and a scan operation . Seek operation and Latch Coupling Surely you already know that you can access data in SQL Server via an index with a seek or scan operation .   Doing a seek operation means that you will use the B-Tree structure to reach the leaf-level data pages .   First the Index Root Page is read, then an Index Page ...