Font Size: a A A

Join Order Selection Optimization With Deep Graph-based Representation

Posted on:2024-05-04Degree:MasterType:Thesis
Country:ChinaCandidate:G Y YeFull Text:PDF
GTID:2568307079971259Subject:Electronic information
Abstract/Summary:PDF Full Text Request
Join order selection is extremely important in the field of database query optimization,and its purpose is to explore the optimal j oin order,thereby improving the query speed of the database.For a query statement with multi-table join information,the database optimizer uses the estimated cost as the standard,selects the join order with the lowest cost from a variety of possible join order methods to perform the join operation,and feeds back the query results in the most efficient way to the user.However,for a query statement with multi-table joins,the size of the state space of the join order is exponentially positively correlated with the number of table joins in the query statement,which leads to the exploration of the optimal join order in the state space is NP-Hard question.Most of the existing join order selection algorithms are generally divided into join order selection methods in traditional databases and j oin order selection methods based on deep reinforcement learning.Traditional methods mainly use human past experience to enumerate the join order,and use dynamic programming or heuristic algorithms to effectively explore the samples of the state space to obtain the optimal j oin order.However,the state space of the traditional method is huge,and the calculation is very time-consuming.In actual use,the state space usually needs to be pruned.In the query scene with a large number of j oins,it is difficult to explore the global optimal join order.The method based on deep reinforcement learning uses the agent to learn the decision to choose the join action when facing different join states,and continuously optimizes the strategy function with the estimated cost as the reward,and then finds the global optimal join order.The method based on deep reinforcement learning can solve the shortcomings of traditional methods,but the existing methods ignore the primary and foreign key relationships between tables in the process of constructing table features,and cannot effectively learn the original related information between tables,which affects The performance of the join order.In addition,the model structure of these methods is complex and the model convergence ability is weak,resulting in a very serious time-consuming model in the training phase,making it difficult for the model to be implemented in real database scenarios.To address the above issues,we propose a j oin order selection with deep graph-based representation.Firstly,the model embeds the primary and foreign key relationship information between tables into the feature representation of the table by constructing a schema diagram,so as to improve the quality of the join order.Secondly,in the feature representation of the state,this model uses a lightweight tree-based attention mechanism to encode the structural information of the current join order,and uses a graph convolutional neural network to extract features from the query statement information,reducing model parameters to improve the model training speed.In addition,in order to improve the convergence ability of the deep reinforcement learning model during the training process,a training strategy based on curriculum learning is designed in this paper,and the query samples are gradually added to the training set according to the difficulty level during the training process.Finally,this paper conducts a large number of experiments on two real and public database domain datasets,which proves that the model proposed in this paper can effectively improve the query speed of the database and its own convergence ability.
Keywords/Search Tags:Join Order Selection, Database Query Optimization, Deep Reinforcement Learning, Graph Representation, Curriculum Learning
PDF Full Text Request
Related items