Composite Primitive Query Execution for Data Processing Speed
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current data processing systems face challenges in efficiently managing and processing massive data due to increased query demands, requiring improved methods to enhance data processing speed and hardware utilization.
Innovation Solution
The system combines query primitives to form composite primitives, generates binary code at runtime, and optimizes sub-expression sets based on computation cost and column usage, utilizing faster storage for temporary data and slower storage for data persistence, thereby increasing data processing speed and hardware utilization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If traditional query execution methods are used, then system simplicity is maintained, but data processing speed is insufficient for massive data
Solution Approach 1:
The query execution system is segmented into multiple functional modules including a query parser that breaks down queries into primitives, a code generator that creates binary code, an execution engine that processes queries, and a cache manager that handles memory caching. This segmentation allows each module to specialize in specific tasks, improving overall processing speed while managing complexity through modular design.
Solution Approach 2:
The system dynamically generates binary code at runtime based on the specific query being executed, rather than using static pre-compiled code. The execution engine adapts to different query types by combining primitives dynamically, and the cache manager adjusts caching strategies based on query patterns. This dynamic behavior enables optimized processing for diverse queries while maintaining system manageability.
2Productivity
If more hardware resources are utilized, then data processing capability increases, but hardware utilization efficiency decreases
Solution Approach 1:
The system performs preliminary parsing of queries into primitives and pre-generates execution plans before actual data processing begins. The cache manager pre-loads frequently accessed data into faster memory layers. This preliminary preparation reduces the computational burden during execution, enabling the system to handle larger data volumes without proportionally increasing hardware resource consumption.
Solution Approach 2:
The system changes execution parameters dynamically based on query characteristics and system state. The code generator produces optimized binary code with different execution parameters for different query types. The cache manager adjusts cache sizes and replacement policies based on access patterns. These parameter optimizations enable efficient use of existing hardware resources while maintaining high processing capability.
3Speed
If query execution is optimized for speed, then data processing speed increases, but cache miss probability increases
Solution Approach 1:
The system merges multiple cache layers into a unified cache management system that operates across different memory levels. The cache manager coordinates between L1, L2, and L3 caches, as well as between different query execution contexts. This merged approach allows the system to maintain aggressive execution optimizations while recovering from cache misses more efficiently by leveraging multiple cache layers, thus maintaining both speed and reliability.
Data Source
AI summary
Embodiment of the present disclosure include an apparatus and method for executing a query, and a system for processing data by using the same. In some embodiments an apparatus for executing a query includes a processor receiving a query and returning a result value. The apparatus may further comprise a storage storing data on the query. The storage of the apparatus may include a first storage temporarily storing data required for the execution of the query. The storage may further include second storage constructing a DB and storing data, wherein the processor combines a plurality of primitives in the query to configure a composite primitive, generates a binary code for the composite primitive in run time, and executes a generated code.


