Data table connection sequence selection method based on machine learning

A connection sequence and machine learning technology, applied in the database field, can solve problems such as low query efficiency, achieve good query performance, accurate data characteristics, and low time-consuming effects

CN112905591AActive Publication Date: 2021-06-04CHENGDU UNIV OF INFORMATION TECH +2
28 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2021-06-04

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a data table connection sequence selection method based on machine learning. The method comprises the following steps: S1, encoding SQL statements, and respectively generating eigenvectors of columns, data tables and connection relationships; s2, designing a vector tree AT according to the eigenvectors of the columns and the data table to generate eigenvectors of a connection tree; s3, designing a partial connection plan model SP to generate a feature vector of a partial connection plan according to the columns, the data table, the connection relationship and the feature vector of the connection tree, and further generating a feature vector of a connection state at the next moment; and S4, constructing a deep reinforcement learning model J according to the feature vector of the connection state at the next moment, and generating an optimal connection sequence of the data table in combination with the partial connection plan model SP and the vector tree AT. The problem that the query efficiency is low due to the fact that an existing query optimizer generates the suboptimal connection sequence of the data table is solved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of databases, in particular to a machine learning-based data table connection sequence selection method. Background technique

[0002] Query operation is the basic operation of relational database, and query efficiency is an important index of database system. So query optimization has become an important research direction in the field of database. Query optimization is to build an execution plan with the least cost, so as to achieve the lowest real query time during query execution and achieve a good user experience. Usually, query optimization includes aspects such as cardinality estimation, cost model, and connection order selection. The effect of query optimization directly affects the performance of database applications.

[0003] The most difficult point of the database query optimizer is the problem of selecting the order of multi-table connection. Solving this problem is very complicated and expensive. Be...

Examples

Embodiment Construction

[0128] The specific embodiments of the present invention are described below so that those skilled in the art can understand the present invention, but it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes Within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are included in the protection list.

[0129] Such as Figure 1~2 As shown, a data table connection sequence selection method based on machine learning includes the following steps:

[0130] S1. Encoding the SQL statement to generate feature vectors of columns, data tables and connection relationships respectively;

[0131] In this embodiment, the data table connection order selection method based on machine learning is constructed on the mainstream database, r...