Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

TempDB Version Store Cleanup

$
0
0

Hi All,

I'm reading about tempdb version store cleanup and wanted to confirm something. We are using SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT set to ON.

Our tempdb has grown to 60GB and the version store is 56GB.

We have old, open transactions (based on sys.dm_tran_active_snapshot_database_transactions) for almost 3 weeks!!

I killed them (6 of them), and now our version store is back to 8GB.

Questions:

1) Is version store cleanup based on the oldest open transaction? Meaning, if I had those transactions open for 3 weeks, then no version cleanup can occur beyond 3 weeks of row versioning.

OR is Version store cleanup based on the objects within the oldest open transaction. Meaning, I killed 5 of the transactions and the version store did not shrink. I killed the 6th and it shrunk. Was the cleanup based on the objects of that 6th transaction (i.e. I had 48GB worth of row versioning for the objects involved in the 6th transaction)?

I tend to believe that cleanup is based on #1 since i'm trying to figure out where to investigate the root cause first - should I look at the fact that I had 6 tx (coming from 6 different servers) with old open transactions, OR do I focus on the 6th transaction only?

Thanks in advance!


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>