Hardware Friendly Key Value Table Design for Relational Hash Join
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing relational database management systems face inefficiencies in join operations, particularly with hash joins, due to difficulties in predicting join selectivity and build table cardinality, expensive resizing of hash tables, and inefficient probing mechanisms that do not leverage modern CPU and memory architectures effectively.
Innovation Solution
The implementation of optimized techniques for building and probing hash tables using single instruction multiple data (SIMD) instructions for parallel processing, which accelerates both the build and probe phases of hash joins by utilizing coarse-grained and fine-grained parallelism, and dynamic selection of data maps to optimize hash table operations for in-memory columnar data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If sequential probing is used for hash tables, then implementation simplicity is maintained, but processing efficiency deteriorates significantly when applied to in-memory columnar data
Solution Approach 1:
The patent segments the probe table into multiple batches and processes them in parallel using SIMD instructions. Each batch is processed independently, allowing concurrent hash computations and memory accesses. This segmentation enables the system to leverage modern CPU architectures while maintaining manageable implementation complexity through structured batch processing.
Solution Approach 2:
The patent transitions from sequential one-dimensional probing to parallel multi-dimensional processing by applying SIMD instructions. This allows simultaneous processing of multiple probe keys across different data lanes, effectively adding a parallelism dimension that dramatically improves throughput without proportionally increasing algorithmic complexity.
2Measurement precision
If hash table resizing is performed to accommodate varying data cardinality, then data distribution accuracy is improved, but processing time and operational continuity deteriorate
Solution Approach 1:
The patent performs preliminary estimation of build table cardinality and join selectivity before constructing the hash table. By using statistical measures and historical data to predict these parameters in advance, the system can allocate appropriate hash table size upfront, avoiding the need for time-consuming resizing operations during execution while maintaining accurate data distribution.
Solution Approach 2:
The patent implements dynamic hash table capacity adjustment that occurs transparently during the join operation. When the actual build table cardinality differs from initial estimates, the system dynamically reallocates hash table buckets in a manner that minimizes disruption to ongoing probe operations, balancing accuracy requirements with operational continuity.
3Speed
If traditional hash table formats are used, then backward compatibility is maintained, but acceleration by modern CPU capabilities is limited
Solution Approach 1:
The patent changes fundamental parameters of the hash table format to optimize for SIMD processing. This includes restructuring data storage to align with vector register sizes, organizing probe keys and hash values in SIMD-friendly patterns, and adjusting memory access patterns to match modern CPU cache hierarchies. These parameter changes enable direct utilization of SIMD instructions while maintaining the essential hash table functionality.
4Measurement precision
If prediction of join selectivity and build table cardinality is performed accurately, then hash table capacity estimation is improved, but computational complexity and data collection requirements increase
Solution Approach 1:
The patent enables the query execution engine to perform self-characterization by automatically collecting statistical measures from the input tables during the optimization phase. The system self-determines cardinality estimates and selectivity predictions using built-in analysis tools, eliminating the need for complex external prediction models or manual parameter specification while achieving accurate capacity estimation.
Data Source
AI summary
The present invention relates to join acceleration. In an embodiment, a computer receives a request for a relational join of build data rows with probe data rows. Based on the request for the relational join, a particular kind of data map from many kinds of data map that can implement the relational join is dynamically selected. Based on the build data rows, an instance of the particular kind of data map is populated. A response is sent for the request for the relational join that is based on the probe data rows and the instance of the particular kind of data map.


