r/SQLServer • ‪ ‪Microsoft Employee ‪ • 23d ago

Community Share Version store read metrics

If you use SQL features that require row versioning, such as RCSI, snapshot isolation, or ADR, you might be wondering if reading row versions makes queries slower and by how much. Until now, there was no direct way to answer that.

In Azure SQL Database, we added new database engine metrics to remove guesswork from this question: Closing a monitoring blind spot: version store read metrics.

What do you think? Useful or meh? Have you run into a problem where this would help?

11 Upvotes

2 comments sorted by

4

u/AngryPets 22d ago

VERY useful - constantly trying to see who/what is generating version-store churn - and while there is some visibility into version-store generation/usage - it's ... not as easy to correlate / aggregate as I'd like.

Having this info available via sys.dm_exec_query_stats and friends will make it STUPID-EASY(TM) to identify regular problems/offenders by simply aggregating churn by query/operation/etc.

In short, HUGE win.

Can't WAIT for this to come to (grounded) SQL Server as a LOT more things than most users suspect will use the version store and can cause MAJOR problems if/when developers don't do a good job of error handling and/or preventing zombies - like RCSI, SI, MARS (effin' MARS), ADR, AND TRIGGERS.
Seriously, in high-volume/highly-concurrent environments a missing FINALLY via callers/app-code can leak connections - keeping version store data alive for ... forever.
There are, obviously, other ways to detect zombies(ish) and leaked-connections - but being able to 'sort' / prioritize those based on version-store churn will be invaluable...

5 thumbs up!

2

u/BrentOzar 23d ago

This is really cool to see!