| CPC G06F 12/0253 (2013.01) [G06F 12/1009 (2013.01)] | 20 Claims |

|
1. A computer-implemented method executed by data processing hardware that causes the data processing hardware to perform operations comprising:
obtaining a request to perform garbage collection on a target table of a database, the target table comprising a plurality of pages, each page of the plurality of pages comprising a plurality of rows and columns of data;
determining, based on the request, a garbage collection transaction identifier (ID) specifying a global minimum transaction ID for garbage collection;
for each respective page of a first set of pages of the plurality of pages:
retrieving, from a page transaction ID table, a respective page minimum transaction ID corresponding to the respective page, the page transaction ID table different from the target table;
determining that the respective page minimum transaction ID is greater than the global minimum transaction ID; and
based on determining that the respective page minimum transaction ID is greater than the global minimum transaction ID, skipping garbage collection of the respective page without accessing the respective page; and
for each respective page of a second set of pages of the plurality of pages:
retrieving, from the page transaction ID table, the respective page minimum transaction ID corresponding to the respective page;
determining that the respective page minimum transaction ID is less than the global minimum transaction ID; and
based on determining that the respective page minimum transaction ID is less than the global minimum transaction ID, accessing the respective page to perform garbage collection.
|