Plan caching using density-based clustering
First Claim
1. A method comprising:
- receiving, by at least one processing device, a query instance according to a query template having a set of parameters;
determining, by the at least one processing device, a plan space point for the query instance, the plan space point based upon the set of parameters; and
predicting, by the at least one processing device, a predicted query plan for the plan space point based upon precision, the precision being a ratio of a number of correct predictions to a number of NULL-free predictions, the predicted query plan selected from a map of query plans according to a confidence threshold from a plan cache that includes at least one histogram, each histogram representative of a cached query plan in the plan cache combined with a previously-selected locality-sensitive hashing function, the histogram storing a frequency distribution of a mapping of sample plan points for the cached query plan by the locality-sensitive hashing function.
1 Assignment
0 Petitions
Accused Products
Abstract
A query plan predictor receives a query instance according to a query template having a set of parameters. The query plan predictor determines a plan space point for the query instance which is based upon the set of parameters. The query plan predictor predicts a predicted query plan for the plan space point, which is selected from a map of query plans according to a confidence threshold from a plan cache that includes at least one histogram. Each histogram is representative of a cached query plan in the plan cache combined with a previously-selected locality-sensitive hashing function. The histogram stores a frequency distribution of a mapping of sample plan points for the cached query plan by the locality-sensitive hashing function.
-
Citations
20 Claims
-
1. A method comprising:
-
receiving, by at least one processing device, a query instance according to a query template having a set of parameters; determining, by the at least one processing device, a plan space point for the query instance, the plan space point based upon the set of parameters; and predicting, by the at least one processing device, a predicted query plan for the plan space point based upon precision, the precision being a ratio of a number of correct predictions to a number of NULL-free predictions, the predicted query plan selected from a map of query plans according to a confidence threshold from a plan cache that includes at least one histogram, each histogram representative of a cached query plan in the plan cache combined with a previously-selected locality-sensitive hashing function, the histogram storing a frequency distribution of a mapping of sample plan points for the cached query plan by the locality-sensitive hashing function. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 19)
-
-
9. A system comprising:
-
at least one processing device configured to process; a query plan predictor configured to; receive a query instance according to a query template having a set of parameters; determine a plan space point for the query instance, the plan space point based upon the set of parameters; and predict a predicted query plan for the plan space point based upon precision, the precision being a ratio of a number of correct predictions to a number of NULL-free predictions, the predicted query plan selected from a map of query plans according to a confidence threshold from a plan cache that includes at least one histogram, each histogram representative of a cached query plan in the plan cache combined with a previously-selected locality-sensitive hashing function, the histogram storing a frequency distribution of a mapping of sample plan points for the cached query plan by the locality-sensitive hashing function. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 20)
-
-
17. A non-transitory computer-readable medium having instructions stored thereon, the instructions causing at least one computing device to perform operations, the operations comprising:
-
receiving a query instance according to a query template having a set of parameters; determining a plan space point for the query instance, the plan space point based upon the set of parameters; and predicting a predicted query plan for the plan space point based upon precision, the precision being a ratio of a number of correct predictions to a number of NULL-free predictions, the predicted query plan selected from a map of query plans according to a confidence threshold from a plan cache that includes at least one histogram, each histogram representative of a cached query plan in the plan cache combined with a previously-selected locality-sensitive hashing function, the histogram storing a frequency distribution of a mapping of sample plan points for the cached query plan by the locality-sensitive hashing function. - View Dependent Claims (18)
-
Specification