How to See Rowcounts and Execution Time for In-Flight Queries in SQL Server
I frequently need to see rowcounts and execution time for queries while they’re running. Maybe I’m troubleshooting a slow query …
Read MoreBy Kendra Little on • 3 min read
I’ve long found it tricky to remember and explain the differences between three similar-sounding waits in SQL Server that all have “LATCH” in the name: PAGELATCH, LATCH, and PAGEIOLATCH waits.
Here’s an illustration that explains these waits, along with wait subtypes.

Here’s a table that compares the three latch wait types:
| Wait Type | Contains “IO”? | Contains “PAGE”? | Page Location | What It Means |
|---|---|---|---|---|
| PAGEIOLATCH | Yes | Yes | On disk (storage) | Waiting to read pages from disk into memory buffers |
| PAGELATCH | No | Yes | In memory | Waiting to access pages that are already in memory |
| LATCH | No | No | N/A (not a page) | Waiting to access a structure or resource in memory that is not a data page |
PAGEIOLATCH at least has a giveaway in its name: the “IO” characters indicate I/O, aka “Input/Output” - a reference to transferring data, in this case from storage to memory.
My definition: “I need to get PAGES from DISK (storage) into BUFFERS in memory. To investigate or reduce this wait, find queries with highest reads and look for indexing and tuning improvements.”
Microsoft docs definition: “Occurs when a task is waiting on a latch for a buffer that is in an I/O request.”
There’s no “IO” in this one. That’s because the page is already in memory.
My definition: I need to get access to a page that is already in memory. Sometimes this is “last page” insert contention, Page Free Space (PFS) contention, or tempdb contention.
Microsoft docs definition: “Occurs when a task is waiting on a latch for a buffer that isn’t in an I/O request.”
There’s no “PAGE” or “IO” in this one. This one is the hardest to explain, too.
My definition: I need to access a structure or resource in memory that is NOT a data page. Can be anything from transaction log management to supporting parallel scans.
Microsoft docs definition: “Occurs when waiting for an [latch subtype] latch. This doesn’t include buffer latches or transaction mark latches.”
First, there are more subtypes than these three (KP, DT) - but these are the most common subtypes I see. Here is how I remember these:
There are tons of great free resources to learn about wait types on the web. Some of my favorites are from Microsoft Learn and Paul Randal of SQL Skills:
Copyright (c) 2025, Catalyze SQL, LLC; all rights reserved. Opinions expressed on this site are solely those of Kendra Little of Catalyze SQL, LLC. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.