Vectorized Hash Table Probing Using SIMD Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database management systems face inefficiencies in executing complex operations like join and aggregation, particularly due to the lack of effective optimization techniques for hash table operations using SIMD instructions.

Innovation Solution

The implementation of vectorized instructions for generating hash tables, probing, and data compaction, along with the use of cuckoo hashing and SIMD registers to optimize hash table operations, determines the most efficient approach between vectorized and non-vectorized methods based on heuristics and resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If traditional non-vectorized instructions are used for hash table operations, then the implementation is simpler and more straightforward, but the execution speed and performance are significantly slower

Engineering Contradiction:
Improveexecution speedVSAvoidinstruction complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent replaces traditional scalar mechanical instruction execution with vectorized SIMD (Single Instruction Multiple Data) instructions. This substitution enables parallel processing of multiple hash table operations simultaneously, dramatically increasing execution speed while managing complexity through standardized vector instruction sets

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent segments hash table operations into vectorizable units that can be processed in parallel. By dividing the hash table probing, building, and aggregation operations into independent vector operations, the system achieves higher throughput without proportionally increasing overall system complexity

Inventive Principle:
Principle #1Segmentation

2Productivity

If vectorized instructions are used for hash table operations, then the performance and efficiency are significantly improved, but the implementation complexity increases

Engineering Contradiction:
Improveoperation efficiencyVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent employs universal SIMD vector instructions that can perform multiple hash table operations (probing, building, aggregation) using the same instruction set. This multi-functionality approach improves productivity by eliminating the need for separate optimized routines for each operation, while keeping implementation complexity manageable through instruction reuse

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent changes the operational parameters from scalar to vector form, enabling batch processing of hash table operations. By transforming single-operation parameters into multi-element vector parameters, the system achieves significant efficiency improvements while leveraging existing hardware vector units

Inventive Principle:
Principle #35Parameter changes

3Loss of time

If traditional hash table probing is used, then the code is easier to implement and debug, but the processing time for join and aggregation operations is excessive

Engineering Contradiction:
Improveprocessing timeVSAvoidease of implementation
Core Design Contradiction:
Loss of timeVSEase of operation

Solution Approach 1:

The patent implements continuous vectorized probing operations that process multiple keys simultaneously without interruption. This continuous action eliminates the sequential overhead of traditional probing, reducing processing time while the standardized vector instruction interface maintains ease of implementation

Inventive Principle:
Principle #20Continuity of useful action

4Productivity

If SIMD registers are used for vectorized hash table operations, then the throughput increases significantly, but the register management and data alignment requirements become more complex

Engineering Contradiction:
ImprovethroughputVSAvoidregister management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent performs preliminary data alignment and padding operations to ensure input data is properly formatted for SIMD register loading. By preparing data in advance with correct alignment, the system achieves high throughput through efficient vector operations while simplifying register management through standardized data preparation routines

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9659046B2Probing a hash table using vectorized instructions
Publication Date: 2017.05.23 ORACLE INT CORP
  • US9659046B2 patent drawing
  • US9659046B2 patent drawing
  • US9659046B2 patent drawing

AI summary

Techniques for performing database operations using vectorized instructions are provided. In one technique, a hash table probe phase involves executing vectorized instructions to determine where in a bucket a particular key is located. This determination may be preceded by one or more vectorized instructions that are used to determine whether the bucket contains the particular key.