Transaction ID Accelerator for Database Garbage Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing garbage collection processes in databases often read the contents of every page to qualify rows for collection, leading to inefficient resource usage and performance issues due to unnecessary page access.

Innovation Solution

A method utilizing a transaction ID accelerator that maintains a page minimum transaction ID table, allowing for the determination of whether pages need to be accessed based on a global minimum transaction ID for garbage collection, thereby skipping unnecessary page access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If garbage collection reads every page to qualify rows for collection, then all rows can be properly evaluated for garbage collection, but CPU and I/O resources are wasted on pages that do not need collection

Engineering Contradiction:
Improvegarbage collection completenessVSAvoidgarbage collection efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary action by maintaining a page minimum transaction ID table that pre-stores the minimum transaction ID for each page. Before garbage collection executes, this table is already populated with transaction ID information, allowing the garbage collector to quickly determine which pages need processing without having to scan or analyze page contents during the collection process itself.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The page minimum transaction ID table serves as an intermediary data structure between the raw page data and the garbage collection logic. Instead of directly examining every page to determine collection eligibility, the garbage collector uses this intermediary table to quickly identify which pages require further processing, thereby reducing direct I/O operations on pages that don't need collection.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If garbage collection accesses every page to determine eligibility, then accurate identification of collectible rows is achieved, but I/O operations increase unnecessarily

Engineering Contradiction:
Improverow qualification accuracyVSAvoidI/O resource consumption
Core Design Contradiction:
Measurement precisionVSLoss of energy

Solution Approach 1:

The system extracts the essential transaction ID information from page data and stores it separately in the page minimum transaction ID table. This extraction allows the garbage collection process to rely on the pre-stored transaction IDs for determining page eligibility, rather than extracting and analyzing actual row data from every page during collection, thereby reducing I/O operations.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of performing full page scans on all pages, the system applies partial action by using the page minimum transaction ID table to identify only the subset of pages that actually require garbage collection. This selective approach processes only the necessary pages while skipping others, reducing overall I/O consumption while maintaining accurate row qualification for pages that are examined.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If a page minimum transaction ID table is maintained to skip unnecessary pages, then garbage collection efficiency improves, but device complexity increases

Engineering Contradiction:
Improvegarbage collection speedVSAvoiddata structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system changes the parameter representation by storing minimum transaction IDs for pages in a separate table structure. This parameter change transforms the garbage collection problem from one requiring full page content analysis to one that can be solved by comparing transaction ID parameters, thereby improving speed while organizing complexity into a manageable tabular format.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12321264B1Transaction ID accelerator for efficient garbage collection of old versions
Publication Date: 2025.06.03 GOOGLE LLC
  • US12321264B1 patent drawing
  • US12321264B1 patent drawing
  • US12321264B1 patent drawing

AI summary

A method for garbage collection includes obtaining a request to perform garbage collection on a target table. The target table includes a plurality of pages. The method includes 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, the method includes retrieving, from a page transaction ID table, a respective page minimum transaction ID corresponding to the respective page. The page transaction ID table is different from the target table. The method also includes 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.