Paged Column Dictionary Memory Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In-memory database systems face challenges in managing large datasets due to increased memory requirements, particularly when dealing with tables that have a large number of columns or large columns, as existing technologies often require the entire dictionary and data to be fully resident in memory, leading to high memory footprints and performance issues.
Innovation Solution
Implementing paged column dictionaries, where only active subsets of column data and dictionary pages are loaded into memory on demand, using traditional buffer cache and paging technologies, and separating dictionary directory structures from data pages to reduce memory usage without affecting write performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the entire dictionary and data are fully resident in memory, then read performance is improved, but memory footprint increases significantly
Solution Approach 1:
The dictionary is divided into multiple dictionary blocks that can be independently managed and loaded into memory only when needed. Each dictionary block contains a subset of the total dictionary entries, allowing the system to segment the large dictionary into smaller, manageable units that reduce overall memory footprint while maintaining fast access to active portions.
Solution Approach 2:
The system dynamically loads and unloads dictionary blocks based on access patterns and memory availability. Dictionary blocks are loaded into memory on demand when their corresponding data is needed, and unloaded when no longer required, creating a dynamic memory management approach that adapts to changing workloads and maintains optimal read performance without requiring the entire dictionary to be resident.
2Quantity of substance
If paged column dictionaries are implemented, then memory footprint is reduced, but system complexity increases
Solution Approach 1:
A dictionary block manager component is introduced as an intermediary between the storage system and the query processing components. This manager handles the complexity of loading, unloading, and managing dictionary blocks in memory, shielding the rest of the system from the complexity of paged dictionary management while enabling reduced memory footprint through controlled dictionary block residency.
3Quantity of substance
If only active subsets of data are loaded into memory, then memory footprint is reduced, but access time may increase
Solution Approach 1:
Dictionary blocks are pre-loaded into memory based on predicted access patterns and query workloads before they are actually needed. The system analyzes incoming queries and proactively loads the relevant dictionary blocks into memory in advance, ensuring that when data access is required, the dictionary blocks are already resident in memory, thus minimizing access time while maintaining reduced memory footprint through selective pre-loading.
Data Source
AI summary
A request for an entry of a dictionary having multiple dictionary blocks may be received, where the dictionary stores string values associated with corresponding value identifiers (IDs) for dictionary compression. One of the dictionary blocks may be selectively loaded into memory, and the dictionary block that has been loaded into memory may be searched. A value ID directory may be constructed in memory, where the value ID directory includes last value IDs for the dictionary blocks, and each of the last value IDs is mapped to an index of one of the dictionary blocks that includes a string value for that last value ID. A separator directory may also be constructed in memory, where the separator directory includes separators for the dictionary blocks, and each of the separators is mapped to an index of one of the dictionary blocks that includes a string value for that separator.


