Method and device for determining optimal query plan

A query plan and optimal technology, applied in the database field, can solve problems that affect the accuracy of optimization results, basic statistical information will not be updated in time, etc.

Pending Publication Date: 2021-11-16
ALIBABA SINGAPORE HLDG PTE LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the prior art, the optimizer engine generally evaluates the execution cost information of each query step through the basic statistical information of the table, wherein the basic statistical information is stored in the system table of the database, including the number of tables, the rows of each table However, the basic statistical information needs to traverse each table

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 and device for determining optimal query plan
  • Method and device for determining optimal query plan
  • Method and device for determining optimal query plan

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0049] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. Implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with aspects of one or more embodiments of the present specification as recited in the appended claims.

[0050]It should be noted that in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or less steps than those described in this specification. In addition, a single step described in this ...

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

One or more embodiments of the invention provide a reference execution cost updating method for query step features. Basic information of the same or similar query steps has the same features, so that the corresponding relationship between the query step features and the reference execution cost is constructed by taking the features of the query steps as identifiers. The reference execution cost of the query step features are updated by obtaining execution result information after a database execution engine completes any query step, determining the features of the query step according to basic information of the query step, determining the actual execution cost of the query step information according to the execution result information, and then taking the actual execution cost as a reference execution cost corresponding to the query step features. Therefore, when the optimizer engine needs to evaluate the execution cost of a certain query step, the corresponding reference execution cost can be queried through the features of the query step.

Description

technical field [0001] One or more embodiments of this specification relate to the technical field of databases, and in particular to a method and device for determining an optimal query plan. Background technique [0002] The database generally includes a parser engine, an optimizer engine, and an executor engine. After the database receives a query request for a certain data, the parser engine parses it into a query plan and sends it to the optimizer engine. After optimization, the optimized query plan is sent to the execution engine, and the executor engine completes the query of the data according to the received query plan and obtains the query result. [0003] After receiving the query plan, the optimizer engine will decompose the query plan into query steps to determine whether each query step can be optimized. Specifically, when it is determined that a certain query step can be replaced by other query steps, by evaluating the query steps Execution cost, to determine...

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): G06F16/2453G06F16/242
CPCG06F16/24542G06F16/24545G06F16/2433
Inventor 常剑董宇
Owner ALIBABA SINGAPORE HLDG PTE LTD
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