IP Library › Granted Patent US 10,191,967
Granted Patent B2
US 10,191,967 · App. 14/979,077 · Granted Jan 29, 2019

Clustering database queries for runtime prediction

Inventor: Ismael Belghiti (Paris, FR)
Assignee: DASSAULT SYSTEMES
G06F17/30598G06F17/30336G06F17/30463G06F17/30469G06K9/6223
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,191,967
App. No.
14/979,077
Granted
Jan 29, 2019
Kind
B2
Abstract

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.

Claims (40)

1. 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 comprising:

providing a number (n) of numerical values (x 1 , . . . , x n ) that represent the runtimes of the reference queries;

computing the optimal K-means clustering of the numerical values for a predetermined number (K) 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 (H) of order equal to the number of numerical values; and

clustering the reference queries according to the computed clustering of the numerical values,

wherein the numerical values (x 1 , . . . , x n ) are sorted and indexed accordingly, and the iterating within the computing includes, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, the computation of a minimal total distortion (TD min (j,k)) achievable for the subset of numerical values (x i ) indexed lower than the respective index (i<=j), with a number of clusters corresponding to the respective iteration rank (k), according to a linear-time Row Minima Searching algorithm applied to the square matrix (H), and

wherein, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, for each row index (i) and each column index (j), the matrix entry (H(i,j)) corresponds to a sum of:

the minimal total distortion (TD min (i−1,k−1)) computed at the previous iteration for the index (i−1) preceding the row index, and

a distortion (disto(i,j)) of the contiguous subset (x i , . . . , x n ) of the numerical values between the row index and the column index.

2. The method of claim 1 , wherein the method further comprises, at each respective iteration rank (k), storing indices (Cut min (j,k)) returned by the Row Minima Searching algorithm.

3. The method of claim 2 , wherein the computing further includes, an optimal clustering from the stored indices.

4. The method of claim 3 , wherein determining the optimal clustering from the stored indices comprises iteratively partitioning the numerical values, starting from the last indexed numerical value (Cut min (n,K)) in the stored indices (Cut min ), wherein at each respective iteration rank (q), the index of the starting numerical value of the currently formed cluster is equal to the index stored, during the iterating within the computing, at an iteration of rank (K-q) equal the predetermined number of clusters minus the respective iteration rank (q) for the row index equal to the index of the last indexed numerical value of the currently formed cluster.

5. A method for predicting the runtime of a target query in a database, the method comprising:

providing a clustering of reference queries in the database obtainable by 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, further comprising

providing a number (n) of numerical values (x 1 , . . . , x n ) that represent the runtimes of the reference queries;

computing the optimal K-means clustering of the numerical values for a predetermined number (K) 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 (H) of order equal to the number of numerical values;

clustering the reference queries according to the computed clustering of the numerical values;

providing the runtimes of the reference queries;

associating the target query to a cluster of the clustering based on similarity of the target query with the reference queries; and

predicting the runtime of the target query according to the runtimes of the reference queries of the cluster associated to the target query,

wherein the numerical values (x 1 , . . . x n ) are sorted and indexed accordingly, and the iterating within the computing includes, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, the computation of the minimal total distortion (TD min (j,k)) achievable for the subset of numerical values (x j ) indexed lower than the respective index (i<=j), with a number of clusters corresponding to the respective iteration rank (k), according to the linear-time Row Minima Searching algorithm applied to the square matrix (H), and

wherein, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, for each row index (i) and each column index (j), the matrix entry (H(i,j)) corresponds to a sum of:

the minimal total distortion (TD min (i−1,k−1)) computed at the previous iteration for the index (i−1) preceding the row index, and

a distortion (disto(i,j)) of the contiguous subset (x i , . . . , x j ) of the numerical values between the row index and the column index.

6. A non-transitory computer readable medium having recorded thereon a computer program comprising instructions for performing 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 comprising:

providing a number (n) of numerical values (x 1 , . . . , x n ) that represent the runtimes of the reference queries;

computing the optimal K-means clustering of the numerical values for a predetermined number (K) 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 (H) of order equal to the number of numerical values; and

clustering the reference queries according to the computed clustering of the numerical values,

wherein the numerical values (x 1 , . . . , x n ) are sorted and indexed accordingly, and the iterating within the computing includes, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, the computation of the minimal total distortion (TD min (j,k)) achievable for the subset of numerical values (x j ) indexed lower than the respective index (i<=j), with a number of clusters corresponding to the respective iteration rank (k), according to the linear-time Row Minima Searching algorithm applied to the square matrix (H), and

wherein, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, for each row index (i) and each column index (j), the matrix entry (H(i,j)) corresponds to a sum of:

the minimal total distortion (TD min (i−1,k−1)) computed at the previous iteration for the index (i−1) preceding the row index, and

a distortion (disto(i,j)) of the contiguous subset (x i , . . . , x j ) of the numerical values between the row index and the column index.

7. A system comprising a processor coupled to a memory, the memory having recorded thereon a computer program comprising instructions for performing 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 comprising:

providing a number (n) of numerical values (x 1 , . . . , x n ) that represent the runtimes of the reference queries;

computing the optimal K-means clustering of the numerical values for a predetermined number (K) 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 (H) of order equal to the number of numerical values; and

clustering the reference queries according to the computed clustering of the numerical values,

wherein the numerical values (x 1 , . . . , x n ) are sorted and indexed accordingly, and the iterating within the computing includes, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, the computation of the minimal total distortion (TD min (j,k)) achievable for the subset of numerical values (x i ) indexed lower than the respective index (i<=j), with a number of clusters corresponding to the respective iteration rank (k), according to the linear-time Row Minima Searching algorithm applied to the square matrix (H), and

wherein, at each respective iteration rank (k), and for each respective index (j) inferior to the number (n) of numerical values, for each row index (i) and each column index (j), the matrix entry (H(i,j)) corresponds to a sum of:

the minimal total distortion (TD min (i−1,k−1)) computed at the previous iteration for the index (i−1) preceding the row index, and

a distortion (disto(i,j)) of the contiguous subset (x i , . . . , x j ) of the numerical values between the row index and the column index.

8. The system of claim 7 , wherein the memory further stores a database, the system being configured to execute the computer program on reference queries in the database and/or on a target query in the database.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 12, 2016
From: BELGHITI, ISMAEL
To: DASSAULT SYSTEMES
Reel/Frame 039131/0134 →
Priority Claims (1)
EP 14307192 · Dec 27, 2014 · regional
Continuity (1)
Related Publication 20160188696A1 · Jun 30, 2016