Method for searching optimal execution plan in database query

An execution plan and search method technology, applied in the database field, can solve problems such as inability to make full use of multi-core, inefficient statement query, and failure to take into account concurrent statement execution.

Inactive Publication Date: 2011-06-01
HUAZHONG UNIV OF SCI & TECH
View PDF2 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Query optimization is a process that can find out the less expensive execution plan from many strategies, but when the number of relationships involved in the sql statement is large (n>6), if the optimization engine traverses all execution plans one by one plan, will consume a lot of optimization time, and eventually lead to low query efficiency
In addition, with the emergence of a large number of multi-core

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
  • Method for searching optimal execution plan in database query
  • Method for searching optimal execution plan in database query
  • Method for searching optimal execution plan in database query

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] figure 1 It is a schematic diagram of how to represent the connection state of the relational table in the query statement in the form of a graph in the present invention. In this example, there are six relationships A, B, C, D, E, and F, so there are six nodes in the graph corresponding to A, B, C, D, E, and F, and the nodes in the graph correspond to the query statements Relationship. Because there is a connection operation between the two relations A and B in the query statement, the two nodes A and B are connected correspondingly in the figure, and because the two relations A and C also have a connection operation, the two nodes A and C are also connected correspondingly in the figure, in turn By analogy, all related operations in the query statement are connected with corresponding edges in the graph.

[0033] figure 2 It is a flow chart of the present invention searching for an optimal execution plan in the graph. Set the current optimal execution plan L when...

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

The invention relates to a method for searching an optimal execution plan in database query, comprising the following steps: execution plans which contain Cartesian product connection operation are not considered in the execution plan searching process (except that a query statement submitted by a user contains the Cartesian product connection operation); meanwhile, the connection relationship ofa relationship table in the statement is expressed in an image format; and finally, the optimal execution plan is searched in the image. The connection relationship of the statement expressed in the image format is as follows: points in the image represent the relationship in the query statement; two points are connected if the relationship corresponding to the two points in the image contains connection operation (including inner connection and outer connection); and the edge weight is the execution cost of the connection operation of two relationships. By using the structure, the optimal execution plan can be obtained in the concurrent execution environment.

Description

technical field [0001] The present invention relates to the field of databases, in particular to a search method for an optimal execution plan of a database execution plan in a concurrent execution environment during a SQL statement query process. Background technique [0002] During the query optimization process of the database, there are usually many possible strategies for a given SQL statement, especially a complex SQL statement. Generally speaking, if a query contains n relationships, there are (2(n-1))! / (n-1)! different connection sequences, when n=7, this number is 665280, and when n=10, this number is 17.6 billion. Query optimization is a process that can find out the less expensive execution plan from many strategies, but when the number of relationships involved in the sql statement is large (n>6), if the optimization engine traverses all execution plans one by one plan, will consume a lot of optimization time, and eventually lead to low query efficiency. ...

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
Inventor 王非黄本雄余国锐邓磊
Owner HUAZHONG UNIV OF SCI & TECH
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