Database Query Execution on GPU and CPU

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computing devices face challenges in efficiently executing database queries due to the inefficiencies of graphical processing units (GPUs) in handling general-purpose computing tasks, particularly those requiring different processing on different data parts, leading to synchronization issues and suboptimal performance.

Innovation Solution

A database system that dynamically selects between CPU and GPU for query execution based on data size, query complexity, and current processing load, generating optimized native code for the chosen processing unit and storing data in a piecewise-columnar fashion to minimize data transfer and synchronization overheads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If GPU is used for executing database queries, then parallel processing capability is improved, but synchronization overhead increases

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidsynchronization overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the database query execution into distinct phases: data loading phase (parallel GPU processing) and result aggregation phase (sequential processing). By dividing the execution workflow into independent segments with clear boundaries, the system maximizes parallel processing benefits while minimizing synchronization requirements between segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary data transformation and organization before GPU execution, converting data into formats optimized for parallel processing. This preliminary action includes data validation, type checking, and structural organization that reduces the need for synchronization during the main parallel execution phase.

Inventive Principle:
Principle #10Preliminary action

2Speed

If GPU is used for general purpose computing, then processing speed is improved, but task adaptability decreases

Engineering Contradiction:
Improveprocessing speedVSAvoidtask adaptability
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The patent creates a universal query execution framework that can handle multiple types of database queries (SELECT, INSERT, UPDATE, DELETE) and various data types through a single GPU-based engine. The system uses abstracted operation codes and standardized data representations that allow the same hardware to perform diverse computing tasks efficiently.

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

Solution Approach 2:

The patent employs parameter changes by dynamically adjusting execution parameters such as thread block size, data precision, and operation types based on the specific query requirements. The system can switch between different processing modes (e.g., integer vs. floating-point operations, different aggregation functions) without changing the underlying GPU architecture.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If data is processed using CPU, then task flexibility is maintained, but processing throughput decreases

Engineering Contradiction:
Improvetask flexibilityVSAvoidprocessing throughput
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent introduces an intermediary layer (query execution engine) that translates high-level database queries into GPU-executable operations. This intermediary handles the complexity of task flexibility on the CPU side while presenting simplified, parallelizable operations to the GPU, thereby maintaining adaptability while achieving high throughput.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the traditional sequential CPU-based query execution mechanism with a GPU-based parallel processing mechanism. By substituting the mechanical sequential processing model with parallel tensor core operations, the system achieves dramatically higher throughput while maintaining query flexibility through software abstraction.

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

4Productivity

If data size increases, then query complexity increases, but execution efficiency on GPU improves

Engineering Contradiction:
Improveexecution efficiencyVSAvoidquery complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent leverages the additional parallel processing dimension provided by GPU architecture to handle large datasets. By distributing data across thousands of parallel threads instead of sequential CPU cores, the system transforms the complexity challenge into a parallelization opportunity, where larger datasets can be processed more efficiently due to better utilization of available parallel resources.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS9811561B2Executing database queries using multiple processors
Publication Date: 2017.11.07 SAP SE
  • US9811561B2 patent drawing
  • US9811561B2 patent drawing
  • US9811561B2 patent drawing

AI summary

A system and a method are disclosed for efficiently executing database queries using a computing device that includes a central processing unit (CPU) and a processing unit based on single instruction multiple thread (SIMT) architecture, for example, a GPU. A query engine determines a target processing unit to execute a database query based on factors including the type and amount of data processed by the query, the complexity of the query, and the current load on the processing units. An intermediate executable representation generator generates an intermediate executable representation for executing a query on a database virtual machine. If the query engine determines that the database query should be executed on an SIMT based processing unit, a native code generator generates native code from the intermediate executable representation. The native code is optimized for execution using a particular processing unit.