Query Pipeline Execution Order Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database systems face challenges in optimizing memory consumption during query processing, particularly in pipeline-based query execution plans, due to increasing data sizes and query complexity in cloud scenarios, which can lead to inefficient use of hardware resources and higher operational costs.

Innovation Solution

A system and method to determine an optimal pipeline execution order based on memory consumption profiles, utilizing data structures and estimated costs provided by a query optimizer, which selects the execution order that minimizes memory usage by analyzing the memory sizes and lifetimes of intermediate results generated by pipeline breakers during execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If pipelines are executed in conventional order, then query processing can be completed, but memory consumption increases

Engineering Contradiction:
Improvememory consumptionVSAvoidquery processing throughput
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The system performs preliminary analysis of pipeline execution orders and their memory consumption profiles before actual query execution. The query optimizer determines multiple candidate execution orders and evaluates their memory requirements in advance, selecting the optimal order that minimizes memory usage while maintaining execution correctness.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts pipeline execution order based on real-time memory conditions and query characteristics. Rather than using a fixed execution order, the system adapts the pipeline sequence to match current memory availability and query complexity, allowing flexible optimization of memory consumption during query processing.

Inventive Principle:
Principle #15Dynamics

2Quantity of substance

If memory consumption is reduced through optimization, then operational costs decrease, but system complexity increases

Engineering Contradiction:
Improvememory consumptionVSAvoidsystem complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The query optimizer automatically performs memory profile analysis and execution order selection without requiring manual intervention. The system self-adjusts pipeline execution orders based on inherent query characteristics and memory constraints, eliminating the need for complex external configuration or manual optimization while achieving memory efficiency.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system changes execution parameters (pipeline execution order) based on memory consumption profiles rather than altering the fundamental query logic or data structures. By optimizing the sequence of operations rather than the underlying system architecture, memory usage is reduced without proportionally increasing system complexity.

Inventive Principle:
Principle #35Parameter changes

3Quantity of substance

If pipeline execution order is optimized for memory, then memory efficiency improves, but execution time may increase

Engineering Contradiction:
Improvememory consumptionVSAvoidexecution time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The system evaluates multiple execution order parameters and selects the optimal sequence that balances memory consumption and execution time. By analyzing memory profiles of different execution orders and choosing the most efficient one, the system achieves memory optimization without excessive time penalties.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The system performs partial optimization by focusing on the most memory-intensive pipelines rather than attempting to optimize every pipeline equally. This selective approach to reordering pipelines achieves significant memory savings while minimizing the overhead and time cost of the optimization process itself.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11874835B2Scheduling of query pipeline execution
Publication Date: 2024.01.16 SAP SE
  • US11874835B2 patent drawing
  • US11874835B2 patent drawing
  • US11874835B2 patent drawing

AI summary

A system includes reception of a query execution plan associated with a plurality of query execution pipelines, estimated execution costs and estimated intermediate result cardinalities, determination of one or more precedence relationships of the plurality of query execution pipelines, determination of an execution order of the plurality of query execution pipelines based on the estimated execution costs, the estimated intermediate result cardinalities, and the one or more precedence relationships, and providing of the execution order of the plurality of query execution pipelines and the query execution plan to a query execution engine.