Automatically and adaptively determining execution plans for queries with parameter markers

a technology of parameter markers and execution plans, applied in the direction of instruments, computing, electric digital data processing, etc., can solve the problems of complex task of the optimizer, the cost of optimization itself may represent a significant fraction of the elapsed time between query submission and the time of query submission, and achieve the effect of accurate model and high prediction accuracy

Inactive Publication Date: 2008-08-14
IBM CORP
View PDF4 Cites 183 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Benefits of technology

[0016]Advantageously, the present invention provides machine learning-based algorithms that automatically and adaptively determine query execution plans for queries having parameter markers. Further, these machine learning-based algorithms ...

Problems solved by technology

However, the task of the optimizer is complex, and the join ordering problem alone has complexity that is exponential in the number of tables [13] (see Appendix A for a list of cited references).
As a result, the cost of optimization itself may represent a significant fraction of the elapsed time between query submission and answer generation.
There is a potential problem with this approach.
In fact, often the difference in cost between the optimizer's plan and the cached plan exceeds the optimization time.
However, this locality is lost when many users interact with the system at any gi...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Automatically and adaptively determining execution plans for queries with parameter markers
  • Automatically and adaptively determining execution plans for queries with parameter markers
  • Automatically and adaptively determining execution plans for queries with parameter markers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

1 Overview

[0038]The task of query optimization in modern relational database systems is important but can be computationally expensive. Parametric query optimization (PQO) has as its goal the prediction of optimal query execution plans based on historical results, without consulting the query optimizer. The machine learning techniques disclosed herein accurately model the output of a query optimizer for queries having parameter markers (a.k.a. parametric queries). The algorithms of the present invention scale gracefully with the number of query parameters, handle non-linear boundaries in plan space, and achieve high prediction accuracy even when a limited amount of data is available for training. Both predicted and actual query execution times are used for learning, and the experimental results disclosed herein demonstrate a total net win of a PQO-based method over a state-of-the-art query optimizer for some workloads. The present invention realizes savings not only in optimization ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

A method for automatically and adaptively determining query execution plans for parametric queries. A first classifier trained by an initial set of training points is generated using a set of random decision trees (RDTs). A query workload and/or database statistics are dynamically updated. A new set of training points collected off-line is used to modify the first classifier into a second classifier. A database query is received at a runtime subsequent to the off line phase. The query includes predicates having parameter markers bound to actual values. The predicates are associated with selectivities. The query execution plan is determined by identifying an optimal average of posterior probabilities obtained across a set of RDTs and mapping the selectivities to a plan. The determined query execution plan is included in an augmented set of training points that includes the initial set and the new set.

Description

FIELD OF THE INVENTION[0001]The present invention relates to a method and system for automatically and adaptively determining execution plans for queries with parameter markers.BACKGROUND OF THE INVENTION[0002]Query optimization is central to the efficient operation of a modern relational database system. The query optimizer is typically invoked every time a new query enters the system. The optimizer identifies an efficient execution plan for the query, based on available database statistics and cost functions for the database operators. In commercial systems, great care has been taken to reduce the overhead of query optimization. However, the task of the optimizer is complex, and the join ordering problem alone has complexity that is exponential in the number of tables [13] (see Appendix A for a list of cited references). As a result, the cost of optimization itself may represent a significant fraction of the elapsed time between query submission and answer generation.[0003]If iden...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30
CPCG06F17/30469G06F16/24545
Inventor FAN, WEILOHMAN, GUY MARINGMARKL, VOLKER GERHARDMEGIDDO, NIMRODRAO, JUNSIMMEN, DAVID EVERETTSTOYANOVICH, JULIA
Owner IBM CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products