Shared Subplan Pipelining for Query Plans With Dependency Breakers
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database management systems face challenges in optimizing query performance due to the complexity of queries and the need to handle multiple transactions efficiently, particularly in handling shared subplans across different strands of evaluation.
Innovation Solution
A database management system traverses the operator topology of a query plan to identify pipelines, assigns pipeline indices, and determines whether shared subplans are pipeline breakers or non-pipeline breakers based on dependencies, updating the query plan to minimize performance penalties.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If shared subplans are evaluated multiple times across different strands of evaluation, then each strand can be executed independently, but redundant evaluation increases processing time and resource consumption
Solution Approach 1:
The patent merges equivalent portions of query plans into shared subplans that can be evaluated once and reused across multiple strands. The system identifies when different strands contain equivalent subplans and consolidates them into a single evaluation unit, eliminating redundant processing while maintaining the ability to serve multiple evaluation contexts.
Solution Approach 2:
The patent performs preliminary analysis during query plan compilation to identify equivalent subplans and establish sharing relationships before execution begins. Pipeline breaker specifications are determined in advance based on dependency analysis, allowing the execution engine to optimize the evaluation order and share results without runtime overhead.
2Reliability
If pipeline breakers are inserted to maintain correct evaluation order, then dependency correctness is ensured, but performance penalties increase due to broken pipelining
Solution Approach 1:
The patent applies pipeline breaker specifications selectively at local positions within the query plan where dependencies require it, rather than uniformly across all shared subplan references. By analyzing pipeline indices and dependency relationships, the system inserts pipeline breakers only where necessary to maintain correctness, allowing pipelining to continue in other portions of the plan.
Solution Approach 2:
The patent dynamically determines pipeline breaker specifications based on the specific dependency relationships and pipeline indices of each shared subplan reference. The system adapts the pipeline breaker placement to the actual execution context, converting references to non-pipeline breakers when dependencies allow and maintaining pipeline breaker status only where required for correctness.
3Use of energy by moving object
If the query plan is optimized to share subplans, then resource utilization improves, but the complexity of managing pipeline dependencies increases
Solution Approach 1:
The patent introduces pipeline indices as an intermediary mechanism to manage dependencies between shared subplans and their references. Each pipeline is assigned a unique index, and dependency relationships are expressed through comparisons of these indices. This intermediary representation simplifies the management of complex dependency networks by providing a systematic way to track and enforce evaluation order.
Solution Approach 2:
The patent changes the parameter representation of pipeline dependencies from complex structural relationships to simple numerical comparisons of pipeline indices. By encoding dependency information in the pipeline index parameter, the system transforms complex dependency management into straightforward numerical ordering, reducing the cognitive and computational complexity of managing shared subplans.
Data Source
AI summary
A database management system (DBMS) traverses an operator topology of a query plan to identify pipelines within the query plan. The query plan may include at least a first shared subplan reference, where the first shared subplan reference refers to a first shared subplan, and where the first shared subplan is associated with a shared node in the operator topology. Also, the DBMS assigns, based on an order of execution, pipeline indices to the pipelines in the query plan. Additionally, the DBMS tracks pipeline dependencies of the query plan. For each shared subplan reference, the database management system specifies the shared subplan reference as a pipeline breaker if its pipeline has a dependency to a pipeline with an index greater than a corresponding shared subplan. Otherwise, the shared subplan reference is specified as a non-pipeline breaker. Then, the query plan is updated based on these shared subplan reference specifications.


