Predicting query execution time
First Claim
1. A system for predicting query execution time in a database system, comprising:
- a processor,a cost model determination device for determining a cost model of a database query optimizer for the database system, the cost model for modeling costs of queries applied to the database system, wherein the optimizer estimates a cost of each operator as a vector of cost units c=(Cs;
Cr;
Ct;
Ci;
Co)T|, whereincs;
seq_page_cost, I/O cost to sequentially scan a page;
cr;
random_page_cost, I/O cost to randomly access a page;
ct;
cpu_tuple_cost, CPU cost to process a tuple;
ci;
cpu_index_tuple_cost, CPU cost to process a tuple via index access;
orco;
cpu_operator_cost, CPU cost to perform an operation,and where a cost CO of an operator O in a query plan is represented as a linear combination as;
CO=nTc=ns·
cs+nr·
cr+nt·
ct+ni·
ci+no·
co.;
a profiling device for determining a group of profiling queries for profiling input/output cost units and processor cost units relating to the database system, and for profiling the input/output cost units and the processor cost units using one or more of the profiling queries in the group to output profiled input/output cost units and profiled processor cost units;
a calibrating device for calibrating cost units in the cost model responsive to the profiled input/output cost units and the profiled processor cost units to output calibrated cost units;
a sampling re-estimator for sampling and re-estimating a cardinality estimation of a final query plan to output an updated cardinality estimation; and
a predictor for applying the calibrated cost units and the updated cardinality estimation in the cost model to generate a prediction of an execution time of a given query.
2 Assignments
0 Petitions
Accused Products
Abstract
There are provided a system and method for predicting query execution time in a database system. A cost model determination device determines a cost model of a database query optimizer for the database system. The cost model models costs of queries applied to the database system. A profiling device determines profiling queries for profiling input/output cost units and processor cost units relating to the database system, and profiles the cost units using the profiling queries to output profiled cost units. A calibrating device calibrates cost units in the cost model responsive to the profiled cost units to output calibrated cost units. A sampling re-estimator samples and re-estimates a cardinality estimation of a final query plan to output an updated cardinality estimation. A predictor applies the calibrated cost units and the updated cardinality estimation in the cost model to generate a prediction of an execution time of a given query.
-
Citations
20 Claims
-
1. A system for predicting query execution time in a database system, comprising:
-
a processor, a cost model determination device for determining a cost model of a database query optimizer for the database system, the cost model for modeling costs of queries applied to the database system, wherein the optimizer estimates a cost of each operator as a vector of cost units c=(Cs;
Cr;
Ct;
Ci;
Co)T|, whereincs;
seq_page_cost, I/O cost to sequentially scan a page;cr;
random_page_cost, I/O cost to randomly access a page;ct;
cpu_tuple_cost, CPU cost to process a tuple;ci;
cpu_index_tuple_cost, CPU cost to process a tuple via index access;
orco;
cpu_operator_cost, CPU cost to perform an operation,and where a cost CO of an operator O in a query plan is represented as a linear combination as;
CO=nTc=ns·
cs+nr·
cr+nt·
ct+ni·
ci+no·
co.;a profiling device for determining a group of profiling queries for profiling input/output cost units and processor cost units relating to the database system, and for profiling the input/output cost units and the processor cost units using one or more of the profiling queries in the group to output profiled input/output cost units and profiled processor cost units; a calibrating device for calibrating cost units in the cost model responsive to the profiled input/output cost units and the profiled processor cost units to output calibrated cost units; a sampling re-estimator for sampling and re-estimating a cardinality estimation of a final query plan to output an updated cardinality estimation; and a predictor for applying the calibrated cost units and the updated cardinality estimation in the cost model to generate a prediction of an execution time of a given query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for predicting query execution time in a database system, comprising:
-
determining a cost model of a database query optimizer for the database system, the cost model for modeling costs of queries applied to the database system, wherein the optimizer estimates a cost of each operator as a vector of cost units c=(cs;
cr;
ct;
ci;
co)T|, whereincs;
seq_page_cost, I/O cost to sequentially scan a page;cr;
random_page_cost, I/O cost to randomly access a page;ct;
cpu_tuple_cost, CPU cost to process a tuple;ci;
cpu_index_tuple_cost, CPU cost to process a tuple via index access;
orco;
cpu_operator_cost, CPU cost to perform an operation,and where a cost CO of an operator O in a query plan is represented as a linear combination as;
CO=nTc=ns·
cs+nr·
cr+nt·
ct+ni·
ci+no·
co.;determining a group of profiling queries for profiling input/output cost units and processor cost units relating to the database system; profiling the input/output cost units and the processor cost units using one or more of the profiling queries in the group to output profiled input/output cost units and profiled processor cost units; calibrating cost units in the cost model responsive to the profiled input/output cost units and the profiled processor cost units to output calibrated cost units; sampling and re-estimating a cardinality estimation of a final query plan to output an updated cardinality estimation; and applying the calibrated cost units and the updated cardinality estimation in the cost model to generate a prediction of an execution time of a given query. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification