ML-Based Query Execution Time Prediction for Concurrent Database Workloads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database management systems (DBMS) query optimizers fail to accurately predict query execution time due to the lack of consideration for concurrently executing queries, leading to inaccurate resource allocation and potential performance degradation.

Innovation Solution

A machine-learning model, such as a random forest regression model, is employed to dynamically predict query execution time by incorporating query-based statistics, current physical resource utilization, and the number of concurrent queries as input features, allowing for more accurate resource allocation and improved performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional query optimizers predict query execution time in isolation, then the prediction process is simple and fast, but the prediction accuracy deteriorates due to not considering concurrent queries

Engineering Contradiction:
Improvequery execution time prediction accuracyVSAvoidprediction system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces a machine learning model as an intermediary component between the query optimizer and the execution engine. This ML model takes query statistics and concurrent query information as inputs and outputs predicted execution time, thereby improving accuracy without requiring fundamental changes to the core query optimization process. The intermediary handles the complexity of concurrent query analysis separately from the traditional optimizer.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the traditional mechanical/deterministic query execution time estimation mechanism with a data-driven machine learning approach. Instead of relying on static cost models and heuristics, the system uses trained ML models that learn from historical execution data and concurrent query patterns to predict execution times more accurately.

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

2Productivity

If query optimizers do not consider concurrent queries, then resource allocation is simpler, but resource allocation accuracy deteriorates leading to performance degradation

Engineering Contradiction:
ImproveDBMS performanceVSAvoidresource allocation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent performs preliminary analysis of concurrent queries and their resource usage patterns before making resource allocation decisions. The machine learning model is trained in advance on historical data including concurrent query information, enabling it to predict execution times that account for resource contention without requiring real-time complex calculations during query optimization.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameters used for resource allocation by incorporating concurrent query metrics (such as number of active queries, resource utilization levels) into the prediction model. This allows the system to dynamically adjust resource allocation based on current system state rather than using static allocation rules.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11971793B2Machine learning model-based dynamic prediction of estimated query execution time taking into account other, concurrently executing queries
Publication Date: 2024.04.30 ROCKET SOFTWARE
  • US11971793B2 patent drawing
  • US11971793B2 patent drawing
  • US11971793B2 patent drawing

AI summary

Current physical resources utilization of a computing system as a whole is monitored. The number of queries concurrently being executed against a database by a database management system (DBMS) running on a computing system is monitored. A query plan for a received query to be executed against the database is generated. The query plan includes operators; the generation of the query plan includes generation of query-based statistics for the received query on a per-operator basis without consideration of the queries concurrently being executed. An estimated execution time of the received query is dynamically predicted using a machine-learning model based on the query-based statistics generated for the received query on the per-operator basis, the current physical resources utilization of the computing system, and the number of queries concurrently being executed. The received query is executed against the database based on the dynamically predicted estimated execution time for the received query.