Query Optimizer Search Space Generation via Dynamic Algorithm Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional query optimizers in database management systems (DBMS) fail to optimize queries efficiently due to the use of a single optimization algorithm, leading to resource exhaustion and either brute force execution or query rejection, especially when system resources are limited.

Innovation Solution

A query optimizer that divides queries into blocks, generates subplans, and selects optimization algorithms based on the complexity of each subplan and available system resources, choosing from a pool of algorithms to ensure efficient access plan generation without exceeding maximum allocated costs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If a single optimization algorithm is used for all queries, then the query optimizer is simple to implement, but it leads to resource exhaustion and fails to optimize queries efficiently when system resources are limited

Engineering Contradiction:
Improvesimplicity of query optimizer implementationVSAvoidquery optimization efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The system dynamically selects optimization algorithms based on query complexity and available system resources. Instead of using a fixed single algorithm, the query optimizer adapts its behavior by choosing from multiple algorithms (e.g., exhaustive search, dynamic programming, greedy approaches) depending on the specific query characteristics and resource availability, thereby resolving the contradiction between simplicity and efficiency.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of algorithm selection based on query complexity metrics and resource constraints. By evaluating query characteristics and available resources, the system selects appropriate algorithms from a pool, transforming the static single-algorithm approach into a dynamic multi-algorithm system that optimizes query processing efficiency without excessive complexity.

Inventive Principle:
Principle #35Parameter changes

2Device complexity

If a single optimization algorithm is used, then the system structure is simple, but it causes resource exhaustion and query rejection under limited system resources

Engineering Contradiction:
Improvequery optimizer structureVSAvoidquery execution reliability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The query optimizer dynamically adjusts its algorithm selection based on real-time resource availability and query characteristics. This dynamic approach prevents resource exhaustion by choosing less resource-intensive algorithms when resources are limited, thereby maintaining system reliability without requiring a fundamentally complex multi-algorithm architecture.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system introduces an intermediary algorithm selection mechanism that mediates between the query requirements and system resources. This intermediary layer evaluates query complexity and resource availability to select appropriate algorithms, preventing direct resource exhaustion while maintaining a relatively simple overall system structure.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If expensive optimization techniques are always used, then query optimization quality is high, but it exceeds maximum allocated cost and wastes system resources

Engineering Contradiction:
Improvequery optimization qualityVSAvoidsystem resource consumption
Core Design Contradiction:
Manufacturing precisionVSUse of energy by moving object

Solution Approach 1:

The system changes the optimization approach based on query complexity parameters and resource constraints. For simple queries, less resource-intensive algorithms are used, while for complex queries where high optimization quality is warranted, more expensive techniques are applied. This parameter-driven selection ensures optimal resource utilization while maintaining query optimization quality where needed.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The system applies optimization techniques partially rather than always using the most expensive methods. By selecting algorithms appropriate to query complexity and resource availability, the system avoids excessive resource consumption on queries that don't require intensive optimization, while still achieving sufficient optimization quality for queries that benefit from more thorough analysis.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentEP2643777B1Highly adaptable query optimizer search space generation process
Publication Date: 2019.03.27 IANYWHERE SOLUTIONS INC
  • EP2643777B1 patent drawingFigure 1
  • EP2643777B1 patent drawingFigure 2
  • EP2643777B1 patent drawingFigure 3

AI summary

Systems, methods and articles of manufacture for determining at least one algorithm from a pool of algorithms to optimize a query. An embodiment includes building optimization blocks for the subplan, determining the complexity of the subplan based on the optimization blocks and selecting an algorithm from a pool of search space generation algorithms based on complexity of the subplan and characteristics of the selected algorithm, and optimizing the subplan with the selected algorithm.