B+Tree Leaf Block Key Compression via Offset Storage

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Inefficient space utilization in B+Tree leaf blocks leads to premature exhaustion of solid-state drive (SSD) space in cloud applications, affecting performance by pushing performance-sensitive data to slower storage.

Innovation Solution

The method involves compressing keys stored in B+Tree leaf blocks by identifying contiguous keys and storing subsequent keys as offsets from a start key, with further compression achieved by implicitly representing offsets when they are of the same size, and creating a new data structure for non-contiguous keys to enhance space utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If keys are stored in full in B+Tree leaf blocks, then data integrity and access accuracy are maintained, but space utilization becomes inefficient leading to premature SSD exhaustion

Engineering Contradiction:
Improvedata integrityVSAvoidspace utilization
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent stores only a copy of the key (specifically, an offset value) in the B+Tree leaf block rather than the full key data. The full key can be reconstructed when needed by combining the stored offset with information from the file metadata, thus maintaining data integrity while significantly reducing storage space requirements

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent extracts only the essential portion of the key (the offset value) and stores it in the leaf block, while the redundant portions of the key are omitted. This extraction approach allows the system to maintain necessary data integrity for access operations while eliminating unnecessary data duplication that consumes storage space

Inventive Principle:
Principle #2Taking out (Extraction)

2Quantity of substance

If compression is applied to keys in B+Tree leaf blocks, then space utilization improves, but key retrieval and comparison operations become more complex

Engineering Contradiction:
Improvespace utilizationVSAvoidoperation complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent uses an offset value as an intermediary representation of the key. Instead of storing and manipulating full keys, the system stores offsets that serve as mediators to locate and retrieve the actual key data from file metadata, thereby reducing storage requirements while maintaining operational efficiency

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary organization of key data during the indexing phase, where offsets are calculated and stored in advance. This preliminary action allows subsequent retrieval operations to be simpler, as the system only needs to fetch and use the pre-calculated offset values rather than performing complex key manipulations

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11366796B2Systems and methods for compressing keys in hierarchical data structures
Publication Date: 2022.06.21 ORACLE INT CORP
  • US11366796B2 patent drawing
  • US11366796B2 patent drawing
  • US11366796B2 patent drawing

AI summary

The present disclosure describes systems and methods for enhancing the space utilization of storing keys in hierarchical data structures, such as B+Tree leaf blocks, by partially or fully compressing the keys. Partially compressing the keys may include storing certain keys as offsets from a start key. Fully compressing the keys may include setting a “type” value included in the header of the leaf block to a value indicating that the keys are implicitly represented by an ordinal key index, which defines the ordinal arrangement of keys in the leaf block. Partially or fully compressing keys, according to the implementations described herein, reduces the amount of space needed to store keys in a leaf block of a B+Tree.