Relational Database Query Optimizer Using Real-Time Statistics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Relational database systems face inefficiencies in query execution due to the lack of consideration for real-time statistics, leading to suboptimal operator selection and potential rebuilding of execution plans, which can result in increased resource usage and execution time.

Innovation Solution

A relational database system that generates a high-level execution plan without specifying physical operators, allowing the query execution engine to request and select physical operators based on real-time statistics and cost estimates, and update error margins for improved operator performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If the query execution engine selects physical operators without real-time statistics, then the execution plan can be generated quickly, but the operator selection is suboptimal leading to increased resource usage and execution time

Engineering Contradiction:
Improveexecution timeVSAvoidoperator selection complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The system pre-collects and maintains statistics about physical operator performance characteristics and database state before query execution. This preliminary information gathering enables the query execution engine to make informed operator selection decisions without requiring complex real-time analysis during query processing, thus reducing execution time while managing complexity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback mechanisms where performance data from previously executed operators is collected and used to refine future operator selections. This feedback loop allows the system to learn from past executions and continuously improve operator selection accuracy, leading to optimized execution time without proportionally increasing system complexity.

Inventive Principle:
Principle #23Feedback

2Productivity

If the system uses real-time statistics for operator selection, then operator performance is optimized, but the system complexity and resource requirements increase

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system extracts and separates the statistics collection and analysis functions from the core query execution path. By isolating these complex statistical processing tasks into dedicated modules, the system can maintain optimized operator selection based on real-time statistics while preventing this complexity from propagating through the entire database system, thus improving productivity without proportionally increasing overall system complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system introduces an intermediary layer between the query optimizer and physical operator execution that handles real-time statistics processing. This intermediary module translates complex statistical data into simplified operator selection recommendations, enabling optimized query execution while shielding the rest of the system from the complexity of real-time statistical analysis.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If the execution plan is rebuilt to accommodate real-time statistics, then operator selection accuracy improves, but the time and resources required for plan generation increase

Engineering Contradiction:
Improvecost estimation accuracyVSAvoidplan generation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system pre-computes cost estimates and operator performance metrics based on real-time statistics before the actual query execution begins. By performing these calculations in advance, the system achieves high measurement precision in cost estimation without requiring time-consuming plan rebuilding during query processing, thus improving accuracy while minimizing the time penalty.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts the level of detail in execution plan generation based on available real-time statistics and query characteristics. When accurate statistics are available, the system generates more precise cost estimates; when statistics are limited, it uses simplified estimation methods. This dynamic approach maintains measurement precision where possible while avoiding unnecessary plan generation overhead.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentEP3735642B1Relational database system that uses real-time statistics for selection of physical operators
Publication Date: 2023.03.01 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3735642B1 patent drawingFigure 1
  • EP3735642B1 patent drawingFigure 2
  • EP3735642B1 patent drawingFigure 3

AI summary

A relational database system may include a query optimizer and a query execution engine. The query optimizer may be configured to receive a query from a query-generating entity and to determine a sequence of operations for executing the query. The query execution engine may use real-time statistics to select physical operators for performing the sequence of operations.