Vectorized Database Operations for Hash Join Performance

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 limitations of traditional hash join and hash aggregation methods, which can lead to suboptimal performance.

Innovation Solution

The implementation of vectorized instructions, such as SIMD instructions, is used to optimize database operations like hash table generation, probing, and aggregation, by employing techniques like cuckoo hashing and data compaction, which enable efficient execution of hash join and aggregation operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional hash join and hash aggregation methods are used, then database operations can be executed, but performance is suboptimal due to inefficiencies in complex operations

Engineering Contradiction:
Improveperformance of database operationsVSAvoidcomplexity of hash join and hash aggregation methods
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent replaces traditional scalar mechanical processing with vectorized SIMD (Single Instruction Multiple Data) instructions. This substitution enables parallel processing of multiple data elements simultaneously, dramatically improving the performance of hash join and hash aggregation operations without increasing algorithmic complexity

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

Solution Approach 2:

The patent segments database operations into distinct phases (build phase and probe phase) and further segments data processing into vectorizable operations. By breaking down complex operations into smaller, independent vector operations, the system achieves better parallelism and performance while maintaining manageable complexity

Inventive Principle:
Principle #1Segmentation

2Productivity

If vectorized instructions are implemented to optimize database operations, then performance improves significantly, but the number of instructions required decreases which may affect implementation complexity

Engineering Contradiction:
Improvedata processing speedVSAvoidnumber of instructions required
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent merges multiple scalar operations into single vectorized SIMD instructions. By combining multiple data processing operations into unified vector instructions, the system reduces the total number of instructions required while achieving parallel processing, thus improving performance without proportionally increasing implementation complexity

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent creates universal vectorized routines that can handle multiple database operations (hash join, hash aggregation) and various data types through a single instruction set. This multi-functionality reduces the overall instruction count needed while maintaining high performance across different operation types

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

3Reliability

If cuckoo hashing and data compaction techniques are employed, then handling of duplicate keys is enhanced, but the device complexity increases

Engineering Contradiction:
Improvehandling of duplicate keysVSAvoidcomplexity of hashing and compaction techniques
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces complex software-based duplicate key handling with vectorized SIMD instructions that can identify and process duplicate keys in parallel. This substitution maintains high reliability in duplicate key handling while reducing the effective complexity through hardware-accelerated operations

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

Solution Approach 2:

The patent performs data compaction and duplicate key identification as preliminary actions before main processing. By pre-processing and consolidating duplicate keys using vectorized operations, the system ensures reliable handling while reducing the complexity of subsequent processing stages

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10671583B2Performing database operations using a vectorized approach or a non-vectorized approach
Publication Date: 2020.06.02 ORACLE INT CORP
  • US10671583B2 patent drawing
  • US10671583B2 patent drawing
  • US10671583B2 patent drawing

AI summary

Techniques for performing database operations using vectorized instructions are provided. In one technique, it is determined whether to perform a database operation using one or more vectorized instructions or without using any vectorized instructions. This determination may comprise estimating a first cost of performing the database operation using one or more vectorized instructions and estimating a second cost of performing the database operation without using any vectorized instructions. Multiple factors that may be used to determine which approach to follow, such as the number of data elements that may fit into a SIMD register, a number of vectorized instructions in the vectorized approach, a number of data movement instructions that involve moving data from a SIMD register to a non-SIMD register and/or vice versa, a size of a cache, and a projected size of a hash table.