Database Query Execution Time Estimation via Historical Data Mining

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database query execution time estimation methods, relying on execution costs, are not reliable for predicting actual execution times, leading to inaccuracies in workload management and user decision-making.

Innovation Solution

A data mining approach combined with a binary decision tree and multiple linear regression techniques is used to estimate the static execution time of database queries by analyzing historical query information, providing either a time range or a specific time estimate.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If execution cost is used to estimate execution time, then the estimation process is simple and fast, but the accuracy of execution time prediction is poor

Engineering Contradiction:
Improveexecution time prediction accuracyVSAvoidestimation method complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces historical query information as an intermediary between the execution cost and the actual execution time. Instead of directly using execution cost to predict execution time, the system uses historical data that captures the actual relationship between cost and time for similar queries, thereby improving prediction accuracy while maintaining a relatively simple estimation process.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a copy of actual execution time data from historical queries and uses this copied information to predict future execution times. By storing and retrieving actual measured execution times from the history table, the system avoids the inaccuracy of theoretical execution cost models while keeping the prediction mechanism simple through direct data lookup and comparison.

Inventive Principle:
Principle #26Copying

2Reliability

If execution cost is used to estimate execution time, then the method is easy to implement, but the reliability of the estimation is low

Engineering Contradiction:
Improveexecution time estimation reliabilityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent performs preliminary actions by collecting and storing actual execution time data in a history table before making predictions. The system pre-processes execution data, recording actual times alongside execution costs, so that when a prediction is needed, reliable historical information is already available to improve the reliability of the estimation without adding complexity to the prediction algorithm itself.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback by using actual execution times from historical queries to improve future predictions. The system continuously accumulates execution data, compares predicted times with actual times, and uses this feedback loop to refine the estimation process, thereby increasing reliability while managing system complexity through iterative improvement.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If detailed analysis of execution cost is performed, then resource utilization understanding is improved, but actual execution time prediction remains inaccurate

Engineering Contradiction:
Improveexecution time measurement accuracyVSAvoidquery execution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary analysis by collecting execution time data during normal query operations and storing it in advance. This pre-collection of historical data allows the system to have accurate execution time measurements ready before they are needed for prediction, eliminating the need for time-consuming analysis at query execution time while maintaining high measurement accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent enables the system to self-service by automatically collecting, storing, and utilizing its own execution time data without requiring external intervention or complex real-time analysis. The database system uses its own historical performance data to predict future execution times, achieving accurate measurements without additional time loss through automated data reuse.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7831594B2Estimating the static execution time of a database query
Publication Date: 2010.11.09 HEWLETT PACKARD ENTERPRISE DEV LP
  • US7831594B2 patent drawing
  • US7831594B2 patent drawing
  • US7831594B2 patent drawing

AI summary

In a method for estimating a static execution time of a database query, a prediction of query runtime tree is built from historical query information. A database query is received. The prediction of query runtime tree is used to estimate the static execution time of the database query.