Multi-Level Trie Index for Database Cache Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database systems face inefficiencies when using large trie data structures, as they require evicting a large portion of the block cache to cache tries, leading to eviction of useful blocks and increased resource usage during key range queries.

Innovation Solution

Implementing multi-level data structures and a multi-level data structure index that allows for caching only relevant tries, using marker keys and record index block numbers to efficiently access files, and storing Rank and Select values for quicker traversal, thereby reducing the need to cache entire tries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If large trie data structures are cached in block cache, then query performance improves, but cache memory is consumed and useful blocks are evicted

Engineering Contradiction:
Improvequery performanceVSAvoidcache memory consumption
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent divides the large trie data structure into multiple smaller tries organized in a multi-level hierarchy. Each try covers a specific key range and is stored as a separate cacheable unit. This segmentation allows the system to cache only the necessary subset of tries relevant to the current query key range, rather than loading the entire trie structure, thereby reducing cache memory consumption while maintaining query performance.

Inventive Principle:
Principle #1Segmentation

2Speed

If entire tries are cached to enable fast access, then access speed improves, but device complexity increases due to cache management

Engineering Contradiction:
Improveaccess speedVSAvoidcache management complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent pre-computes and stores metadata about each try (including key range information and location pointers) in an index structure. This preliminary organization allows the system to quickly identify and load only the specific tries needed for a given query, eliminating the need for complex runtime cache management algorithms while maintaining fast access speeds.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If multi-level data structures are implemented with indexes, then query efficiency improves, but data structure complexity increases

Engineering Contradiction:
Improvequery efficiencyVSAvoiddata structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces an index structure as an intermediary layer between the query interface and the multi-level try data structures. The index contains metadata about key ranges and try locations, enabling efficient query routing without requiring complex traversal logic in the main query processing path. This intermediary simplifies the overall system architecture while maintaining high query efficiency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20240320204A1Index for multi-level data structures
Publication Date: 2024.09.26 SALESFORCE INC
  • US20240320204A1 patent drawing
  • US20240320204A1 patent drawing
  • US20240320204A1 patent drawing

AI summary

Techniques are disclosed relating to index metadata that is usable for accessing multi-level data structures. A computer system may operate a database, including maintaining a set of records having a set of corresponding keys. The computer system may create multi-level data structures that facilitate key range lookups against those records. A given multi-level data structure may store key information indicative of a subset of the corresponding keys. The computer system may create separate index metadata that is usable for accessing the multi-level data structures. The index metadata may specify indications of key information that is stored in the multi-level data structures and locations of the multi-level data structures. The computer system may perform a key range lookup that includes using the index metadata to determine a particular set of the multi-level data structures whose key information corresponds to a key range of the key range lookup.