Auxiliary Query Optimizer for High-Quality Plans Without Runtime Delay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern database systems face challenges in optimizing complex queries due to the exponential growth of potential query plans, leading to performance issues and computational constraints, making it difficult to improve query performance without degrading existing systems.

Innovation Solution

Implementing an auxiliary query optimizer framework that generates and evaluates query plans outside the production environment, allowing for more thorough optimization using different techniques and settings, which can be decoupled from the inline query optimizer, thus reducing the risk of performance degradation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If an inline query optimizer is used to process queries in production, then query execution time is kept short, but the quality of query optimization is limited due to time constraints

Engineering Contradiction:
Improvequery optimization qualityVSAvoidquery execution time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The query optimization process is divided into two separate phases: a preliminary optimization phase that runs outside production hours to generate multiple candidate query plans, and a final selection phase that chooses the best plan quickly during production. This segmentation allows thorough optimization without impacting real-time query execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Query optimization is performed in advance during off-peak hours or in a preliminary stage, generating and evaluating multiple potential query plans before they are needed in production. This preliminary action allows the system to prepare optimized plans ahead of time, so that when queries are executed in production, the optimization is already complete.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If query optimizer changes are made to improve performance, then query performance may improve, but the risk of performance degradation increases

Engineering Contradiction:
Improvequery performanceVSAvoidperformance stability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system creates and maintains a library of pre-optimized query plans as reusable templates. Instead of modifying the production query optimizer directly, new optimization techniques are first implemented as separate, testable components that generate alternative plans. These alternative plans are then evaluated and selected, allowing improvements to be applied without directly altering the stable production system.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

An intermediary layer is introduced between the query parser and the query executor, which serves as a buffer for testing and evaluating new optimization techniques. This intermediary allows experimental optimizations to be developed, tested, and validated in isolation before being integrated into the production system, thereby reducing the risk of performance degradation.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If the search space for query plans is expanded to consider more possibilities, then optimization quality improves, but computational complexity increases exponentially

Engineering Contradiction:
Improvequery plan qualityVSAvoidoptimization computational complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The system performs extensive search and evaluation of potential query plans during off-peak hours or in a preliminary optimization stage, where computational resources are available and time constraints are relaxed. By completing the heavy computational work ahead of time, the system can generate high-quality optimized plans without impacting production performance.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The complex query plan generation and evaluation process is extracted from the production query execution path and placed in a separate preliminary optimization stage. This extraction allows the heavy computational tasks to be performed independently during off-peak hours, separating the optimization complexity from the execution time requirements.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS20260050594A1Auxiliary query optimizer providing improved query performance
Publication Date: 2026.02.19 SAP SE
  • US20260050594A1 patent drawing
  • US20260050594A1 patent drawing
  • US20260050594A1 patent drawing

AI summary

Techniques and solutions are provided for improved query optimization, including for sub-portions of a query plan. A query is submitted to an inline query optimizer and at least one auxiliary query optimizer. The query is optimized by the inline query optimizer and the auxiliary query optimizer. A query processor can evaluate costs associated with query plans produced by the inline query optimizer and the auxiliary query optimizer and select a plan for execution that is most performant.