B+Tree Leaf Block Key Compression via Offset Storage
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
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
Data Source
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.


