K-means Clustering Database Queries Runtime Prediction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for clustering queries in databases are limited as they either do not produce optimal K-means clustering or are too slow, failing to efficiently predict query runtime for effective workload management and query scheduling.

Innovation Solution

A computer-implemented method using a linear-time Row Minima Searching algorithm to compute the optimal K-means clustering of query runtimes, allowing for fast and accurate clustering of reference queries for predicting the runtime of target queries based on similarity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing clustering methods are used for query runtime prediction, then clustering can be performed, but the methods are too slow and do not produce optimal K-means clustering

Engineering Contradiction:
Improveclustering accuracyVSAvoidclustering computation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent transforms the K-means clustering problem into a dynamic programming problem by changing the computational parameters and approach. It defines a cost function based on squared Euclidean distances and uses dynamic programming recurrence relations to compute optimal cluster assignments, achieving both optimal clustering accuracy and improved computational efficiency compared to traditional K-means iterative methods

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent replaces the mechanical iterative optimization process of traditional K-means clustering with a systematic dynamic programming approach. Instead of repeatedly updating centroids and reassigning points until convergence, the method uses a structured computation with defined recurrence relations and bottom-up evaluation to directly determine optimal clustering, substituting the iterative mechanical process with a more efficient algorithmic system

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

2Measurement precision

If optimal K-means clustering is computed using traditional methods, then accurate clustering is achieved, but the computation is too slow for practical query scheduling

Engineering Contradiction:
Improveclustering optimalityVSAvoidclustering computation speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent segments the clustering computation into distinct phases: preprocessing to compute pairwise distances, dynamic programming to determine optimal cluster boundaries, and postprocessing to assign cluster labels. This segmentation allows each phase to be optimized independently and enables efficient computation of what would otherwise be an intractable optimization problem

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary computations of pairwise squared Euclidean distances between all query points and cluster centroids before executing the main clustering algorithm. This preprocessing step stores distance information that is reused throughout the dynamic programming computation, avoiding redundant distance calculations and significantly improving computational efficiency

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10191967B2Clustering database queries for runtime prediction
Publication Date: 2019.01.29 DASSAULT SYSTEMES SA
  • US10191967B2 patent drawing
  • US10191967B2 patent drawing

AI summary

The invention notably relates to a computer-implemented method of clustering reference queries in a database for prediction of the runtime of a target query in the database based on similarity of the target query with the reference queries. The method comprises providing a number of numerical values that represent the runtimes of the reference queries; computing the optimal K-means clustering of the numerical values for a predetermined number of clusters, wherein the computing includes iterating, a number of times corresponding to the predetermined number of clusters, a linear-time Row Minima Searching algorithm applied to a square matrix of order equal to the number of numerical values; and clustering the reference queries according to the computed clustering of the numerical values.Such a method improves the field of database query runtime prediction.