Database Query Task Scheduling to Reduce Thread Overhead
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database management systems face increased execution time due to high management overhead when executing queries with thousands of tasks across multiple processor cores, whether using threads or pseudo-threads, as they either overutilize a single core or incur excessive thread management costs.
Innovation Solution
A database management system that dynamically generates tasks for query execution across multiple processor cores, utilizing a plurality of threads to execute these tasks concurrently, reducing thread management overhead by sharing contexts between threads when appropriate.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If threads are used to execute tasks in a DBMS, then query execution can be parallelized across multiple processor cores, but thread management overhead increases significantly when thousands of tasks are generated
Solution Approach 1:
The patent merges multiple tasks into a single thread by implementing a task queue mechanism where one thread can manage and execute multiple tasks sequentially. This reduces the number of threads required from thousands to a manageable number, significantly lowering thread management overhead while maintaining parallel execution capabilities across multiple processor cores.
Solution Approach 2:
The patent implements dynamic task assignment where threads can be dynamically created, assigned tasks from a queue, and terminated based on workload demands. This dynamic approach allows the system to adapt thread utilization to actual query complexity and data size, optimizing resource usage without maintaining a fixed large number of threads.
2Device complexity
If pseudo-threads are used to reduce management overhead, then thread management becomes simpler, but only one processor core can be utilized
Solution Approach 1:
The patent segments the execution model into two distinct layers: a management layer using pseudo-threads for simplified task orchestration and an execution layer using real threads for parallel processor core utilization. This segmentation allows the system to enjoy the management simplicity of pseudo-threads while achieving the parallel processing power of multiple processor cores through real thread execution.
3Manufacturing precision
If thousands of tasks are generated for a single query, then comprehensive data processing is achieved, but execution time increases due to management overhead
Solution Approach 1:
The patent implements preliminary action by pre-generating and queuing tasks before actual execution begins. The task queue is prepared in advance with all necessary operations defined, allowing the system to efficiently process thousands of tasks without the overhead of dynamic task creation during execution. This preliminary preparation significantly reduces query execution time while maintaining complete data processing.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A database management system (DBMS) generates a query execution plan including information representing one or more database (DB) operations necessary for executing a query and executes the query based on the query execution plan. In the execution of the query, the DBMS dynamically generates a task for executing a DB operation and executes the dynamically generated task. The DBMS executes a task in a plurality of threads executed by a processor core.