Microsoft SQL Server 2014 Unleashed
by Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
Garbage Collection
Because SQL Server’s In-Memory OLTP is a row-versioning system, data modifications generate versions of rows rather than updating row data. Eventually, older row versions will become stale. As described earlier, every row has a BeginTs and EndTs timestamp that indicate when the row was created and when it was deleted. Transactions only see the versions of rows that were valid at the time when the transaction started, that is, the Global Transaction Timestamp value at the time the transaction started is between the BeginTs and EndTs of the row. When the EndTs of a row is older than the Global Transaction Timestamp of the oldest active transaction in the system, the row is considered to be stale. Since stale rows are invisible ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access