GPU Block Index Filtering for Database Query Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database querying methods using GPUs are inefficient due to limited global memory and long data copying times, especially when handling multiple query conditions, which complicates the query process and lowers efficiency.
Innovation Solution
A method and apparatus that utilize a CPU-generated block index set stored in GPU global memory, allowing asynchronous processing by GPU processes to filter block indices based on query conditions, reducing the need for repeated data copying and simplifying the query process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If partitioned data is copied from memory to GPU global memory for each query condition, then the query can be executed on GPU, but the copying time increases and query efficiency decreases
Solution Approach 1:
The patent pre-copies partitioned data from system memory to GPU global memory before query execution. This preliminary action ensures that data is already in GPU memory when queries arrive, eliminating the need for repeated copying during query processing and reducing query response time.
Solution Approach 2:
The patent maintains data continuously in GPU global memory across multiple queries by pre-loading it. This continuous presence of data in GPU memory allows multiple query conditions to be processed without interrupting the useful action of data access, thereby improving overall query execution efficiency.
2Adaptability or versatility
If partitioned data is repeatedly copied to GPU global memory for multiple query conditions, then each query can be processed, but the query process becomes complicated and efficiency is lowered
Solution Approach 1:
The patent merges multiple query condition processing into a single GPU execution context by having all partitioned data already loaded in global memory. This combining approach allows the GPU to handle multiple query conditions simultaneously or sequentially without requiring separate data copying operations, thereby reducing process complexity while maintaining adaptability to multiple query conditions.
Data Source
AI summary
A method and an apparatus for querying data in a database, and the method includes: receiving a query instruction; determining a status of each block index in a block index set prestored in a global memory of a GPU; when each block index in the global memory of the GPU is in an asynchronous state, starting one or more GPU processes to filter the block index in the global memory of the GPU according to a query condition, to obtain a first block index query result; and determining a final data query result according to the first block index query result. In this method, querying is performed by directly using a GPU process, thereby omitting a process of repeatedly copying partitioned data from a memory in the prior art, shortening query time, and improving query efficiency.


