Font Size: a A A

Research And Implementation Of Database Query Optimization Based On Graph Neural Network

Posted on:2022-02-06Degree:MasterType:Thesis
Country:ChinaCandidate:D S HeFull Text:PDF
GTID:2518306524490014Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the development of Internet technology,showing a counting upward trend in data,and big data has become the main theme of the information age.For the database field,the following problem is how to effectively organize and manage data.In order to meet the storage requirements,a lot of new-architecture databases have been continu-ously created,but the query optimization has not yet made a breakthrough.Improving the performance of database query execution has always been an important research direc-tion in the database field.Traditional database query optimization methods are no longer adapted to the current large-scale data volume and new-structured databases.Benefited to artificial intelligence technology,using the powerful learning ability of deep learning can effectively solve many problems.The integration of artificial intelligence technology and database has also become one of the important directions of current development.Many researches have also made good progress,but they still face huge challenges.Aiming at the inefficient use of data distribution characteristics and association rela-tionships in query optimization,This research proposed a database optimization method based on graph neural network,which effectively utilizes the feature extraction ability of graph structure data of graph neural network,and analyzes the structural features of query plan trees and data association characteristics,the proposed main algorithms including GCE(GNN Based Cost Estimation)and RGOS(Reinforcement-learning and GNN Based Join Order Selection).The GCE cardinality estimation algorithm mainly uses the Tree-LSTM(Long Short-Term Memory)tree graph neural network to extract the structural features of the query plan tree,and uses the graph convolution network to extract the as-sociation relationship and the topological relationship of each data column.The learning of a large amount of historical data improves the accuracy of the query and provides a more reliable evaluation basis for the physical optimization stage.Join order selection algorithm RGOS mainly uses graph convolution algorithms to extract query features and connection sequence features,and training model in reinforcement learning way with the true feedback reward from the database,thereby improving the effect of j oin order selec-tion.Finally,this article applies the above two optimization algorithms to the open source distributed relational database TiDB to form a complete database system.Extensive ex-periments on Join Order Benchmark(JOB)shows that compared with TiDB's original car-dinality estimation algorithm,the accuracy of the cardinality estimation algorithm GCE is increased by about 12 times;at the same time,the join order selection optimization algorithm RGOS can improve the average query performance of TiDB by 40%.
Keywords/Search Tags:Database, Query Optimization, Cadinality Estimation, Join Order, Graph Neural Network
PDF Full Text Request
Related items