| CPC G06F 16/24542 (2019.01) [G06F 11/3409 (2013.01)] | 15 Claims |

|
1. A computer-implemented method for robust query execution plan selection, the method comprising:
training a model to estimate, for an input comprising a query and one or more plans, an execution time for each plan and a respective uncertainty of the execution time for each plan;
inputting, to the model, a new query and a search space comprising a plurality of candidate plans;
given an estimated distribution for the execution time of each candidate plan characterized by the estimated execution time and respective uncertainty, computing a suboptimality risk for each candidate plan compared to the other candidate plans, wherein suboptimality risk is defined as a ratio of a cost of the respective execution plan to a cost of an optimal execution plan; and
selecting, responsive to an output from the model, a plan of the plurality of candidate plans, wherein the plan is selected according to a plan selection policy, wherein the plan selection policy comprises at least one of:
selecting a plan by assuming that candidate plans have higher costs proportional to an estimated standard deviation of their respective model uncertainty, data uncertainty, or total uncertainty; and
selecting a plan with minimum suboptimality risk using model uncertainty, data uncertainty, or a total uncertainty; and
executing the new query using the selected plan of the plurality of candidate plans rather than an alternative plan having a lower execution time estimate, thereby limiting a maximum suboptimality of the execution time.
|