摘要 |
PROBLEM TO BE SOLVED: To provide a computer-implemented method of clustering reference queries in a database for prediction of the runtime of a target query in the database on the basis of similarity of the target query with the reference queries.SOLUTION: The method comprises: providing a number of numerical values that represent the runtimes of the reference queries (S10); and computing the optimal K-means clustering of the numerical values for a predetermined number of clusters (S20), where 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 an 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.SELECTED DRAWING: Figure 1 |