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 Moreon • 2 min read
One of the great things about writing presentations is that it spurs you to “clean up” your definitions. When it comes to writing a slide about something, I ask myself, “Do I really know what that is?” I check my assumptions, and clarify how I think about something.
This week I was working with SQL Server memory settings, and I “cleaned up” my understanding of the following definitions.

“Locked pages” must be kept in physical memory
For a process in Windows, this shows…
For a process in Windows, this shows…
My favorite way to get comfortable with these metrics is to set yourself up with a test SQL Server environment far, far away from production. Get your SQL Server using memory, download TestLimit64.exe and Process Explorer from Microsoft Sysinternals, and get to creating memory pressure and watching your metrics!
Want to know how things change when you lock pages, or change your Windows page file configuration? These tools will let you see it in action, rather than guessing.
This classic blog post by Bob Ward talks about Locked Pages for SQL Server in this classic post from 2009.
This msdn page defines what the Working Set for a process is.
This Stack Overflow question and answer compares Private Bytes, Working Set, and Virtual Bytes – and explains what’s tricky about these measurements.
If you want to go way deeper, the Windows Internals books and Mark Russinovich’s blog posts are for you!
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.