Dynamic Query Optimizer Using Reinforcement Learning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing join optimization techniques in distributed file systems face challenges such as outdated statistical information, inability to capture complex data relationships, and high computational overhead, leading to suboptimal query execution plans.

Innovation Solution

A dynamic query optimizer system that incorporates a transfer learning engine and a reinforcement learning engine to learn from historical query execution data, predict optimal join orders, algorithms, and types, and adapt to changing workloads and data characteristics.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If traditional join optimizers use statistical information for cost estimation, then query execution plans can be generated, but the statistical information becomes outdated and leads to suboptimal execution plans

Engineering Contradiction:
Improvequery execution timeVSAvoidstatistical information accuracy
Core Design Contradiction:
Loss of timeVSLoss of information

Solution Approach 1:

The patent implements dynamic query optimization by continuously updating statistical information about data distributions and access patterns. The system transitions from static, outdated statistics to dynamic, real-time statistics that adapt to changing workloads and data characteristics, ensuring accurate cost estimation and optimal execution plans.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system incorporates feedback mechanisms where actual query execution results are used to update and refine statistical information. This closed-loop approach ensures that the optimizer learns from past executions and continuously improves its cost estimation accuracy, preventing the statistical information from becoming outdated.

Inventive Principle:
Principle #23Feedback

2Adaptability or versatility

If rule-based configurations are used for join optimization, then optimization decisions can be made, but complex relationships between data tables and query characteristics cannot be captured

Engineering Contradiction:
Improvecapture of complex data relationshipsVSAvoidoptimizer system complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent replaces rule-based mechanical optimization systems with machine learning models that can automatically learn and capture complex relationships between data tables and query characteristics. The ML-based optimizer substitutes rigid rule-based configurations with adaptive, data-driven decision-making capabilities.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The system changes the fundamental parameters of the optimization approach by transitioning from fixed rule-based configurations to dynamic parameters derived from machine learning models. This allows the optimizer to adapt to complex relationships that cannot be expressed through traditional rule-based configurations.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If sophisticated join optimization techniques are employed, then query execution efficiency can be improved, but optimization overhead increases

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidoptimization overhead
Core Design Contradiction:
ProductivityVSUse of energy by stationary object

Solution Approach 1:

The patent applies preliminary action by pre-computing and caching optimization results from machine learning models for common query patterns. This allows the system to quickly retrieve pre-analyzed execution plans without performing full optimization calculations each time, reducing optimization overhead while maintaining high execution efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system discards redundant optimization calculations by identifying and reusing previously computed optimization results. When similar queries are detected, the system recovers and reuses the cached optimization plans, avoiding重复 computation and reducing overall optimization overhead.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentUS20250147961A1Systems and methods for dynamic query optimization
Publication Date: 2025.05.08 WELLS FARGO BANK NA
  • US20250147961A1 patent drawing
  • US20250147961A1 patent drawing
  • US20250147961A1 patent drawing

AI summary

Systems, apparatuses, methods, and computer program products are disclosed for dynamic query optimization. An example method includes receiving, by communications hardware, a first query and determining, by a query analysis engine, whether the first query corresponds to a stored query of a historical query repository. The method also includes determining, in response to determining that the first query does not correspond to the stored query, determining, by the query analysis engine, a parameter set indicating a current state associated with a system involved in an execution of the first query, processing, by a reinforcement learning engine, the first query and the parameter set in accordance with a plurality of policies, selecting, by the reinforcement learning engine and based on the processing, a first policy from the plurality of policies, and generating, by the reinforcement learning engine and based on the first policy, a query execution plan for the first query.