Shared Subplan Pipelining for Query Dependency Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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, leading to inefficiencies in processing and response times.

Innovation Solution

A database management system identifies shared subplans within query plans, assigns pipeline indices, and determines whether to specify them as pipeline breakers or non-pipeline breakers, thereby optimizing the query plan to improve performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If shared subplans are used in query plans, then query processing efficiency is improved by avoiding repeated evaluation, but pipeline dependency management becomes more complex

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidpipeline dependency management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The query plan is segmented into multiple pipelines with unique indices, allowing the system to track and manage dependencies between shared subplans. Each pipeline is independently identified and managed, enabling efficient resolution of dependencies without overwhelming complexity

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Pipeline indices are assigned and dependencies are tracked in advance during query plan optimization, before execution begins. This preliminary organization of pipeline relationships enables the execution engine to efficiently manage shared subplans without complex runtime dependency resolution

Inventive Principle:
Principle #10Preliminary action

2Reliability

If pipeline breakers are inserted to manage dependencies, then correctness of execution is improved, but performance deteriorates due to intermediate result materialization

Engineering Contradiction:
Improveexecution correctnessVSAvoidquery performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Pipeline breakers are selectively applied only at specific shared subplan references where dependency conflicts exist, rather than universally. The system identifies local contexts where materialization is necessary and applies pipeline breakers only there, maintaining performance in other areas

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system dynamically determines whether to apply a pipeline breaker based on pipeline index comparisons and dependency analysis. By changing the pipeline execution parameter (break or continue) based on specific conditions, the system balances correctness and performance

Inventive Principle:
Principle #35Parameter changes

3Reliability

If all shared subplan references are treated as pipeline breakers, then execution correctness is ensured, but memory consumption increases due to unnecessary materialization

Engineering Contradiction:
Improveexecution correctnessVSAvoidmemory consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

Instead of applying pipeline breakers to all shared subplan references (excessive action), the system applies them only to the specific references where dependency conflicts are detected (partial action). This selective approach maintains correctness while avoiding unnecessary materialization and memory consumption

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentEP4660829A1Shared subplan pipelining inference
Publication Date: 2025.12.10 SAP SE
  • EP4660829A1 patent drawingFigure 1
  • EP4660829A1 patent drawingFigure 2
  • EP4660829A1 patent drawingFigure 3

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.