Reinforcement Learning with Tree-LSTM for Join Order Selection

被引:75
|
作者
Yu, Xiang [1 ]
Li, Guoliang [1 ]
Chai, Chengliang [1 ]
Tang, Nan [2 ]
机构
[1] Tsinghua Univ, Beijing, Peoples R China
[2] QCRI, Doha, Qatar
关键词
DATABASE TUNING SYSTEM;
D O I
10.1109/ICDE48307.2020.00116
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Join order selection (JOS) the problem of finding the optimal join order for an SQL query is a primary focus of database query optimizers. The problem is hard due to its large solution space. Exhaustively traversing the solution space is prohibitively expensive, which is often combined with heuristic pruning. Despite decades-long effort, traditional optimizers still suffer from low scalability or low accuracy when handling complicated SQL queries. Recent attempts using deep reinforcement learning (DRL), by encoding join trees with fixed-length hand-tuned feature vectors, have shed some light on JOS. However, using fixed-length feature vectors cannot capture the structural information of a join tree, which may produce poor join plans. Moreover, it may also cause retraining the neural network when handling schema changes (e.g., adding tables/columns) or multialias table names that are common in SQL queries. In this paper, we present RTOS, a novel learned optimizer that uses Reinforcement learning with Tree-structured long shortterm memory (LSTM) for join Order Selection. RTOS improves existing DRL-based approaches in two main aspects: (1) it adopts graph neural networks to capture the structures of join trees; and (2) it well supports the modification of database schema and multi-alias table names. Extensive experiments on Join Order Benchmark (JOB) and TPC-H show that RTOS outperforms traditional optimizers and existing DRL-based learned optimizers. In particular, the plan RTOS generated for JOB is 101% on (estimated) cost and 67% on latency (i.e., execution time) on average, compared with dynamic programming that is known to produce the state-of-the-art results on join plans.
引用
收藏
页码:1297 / 1308
页数:12
相关论文
共 50 条
  • [1] Improving Tree-LSTM with Tree Attention
    Ahmed, Mahtab
    Samee, Muhammad Rifayat
    Mercer, Robert E.
    [J]. 2019 13TH IEEE INTERNATIONAL CONFERENCE ON SEMANTIC COMPUTING (ICSC), 2019, : 247 - 254
  • [2] Join Order Selection with Deep Reinforcement Learning: Fundamentals, Techniques, and Challenges
    Yan, Zhengtong
    Uotila, Valter
    Lu, Jiaheng
    [J]. PROCEEDINGS OF THE VLDB ENDOWMENT, 2023, 16 (12): : 3882 - 3885
  • [3] A deep reinforcement learning model with plan value network for join order selection
    Qiao, Yifan
    Wei, Shengjie
    Gao, Ruiwei
    Han, Nan
    Qiao, Shaojie
    Song, Haiquan
    [J]. International Journal of Wireless and Mobile Computing, 2021, 21 (04): : 365 - 374
  • [4] Automatic Source Code Summarization with Extended Tree-LSTM
    Shido, Yusuke
    Kobayashi, Yasuaki
    Yamamoto, Akihiro
    Miyamoto, Atsushi
    Matsumura, Tadayuki
    [J]. 2019 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN), 2019,
  • [5] Neural machine translation with Gumbel Tree-LSTM based encoder
    Su, Chao
    Huang, Heyan
    Shi, Shumin
    Jian, Ping
    Shi, Xuewen
    [J]. JOURNAL OF VISUAL COMMUNICATION AND IMAGE REPRESENTATION, 2020, 71
  • [6] 改进Tree-LSTM网络的情感分析方法
    邹东尧
    王斌
    王丽萍
    [J]. 现代电子技术, 2022, (09) : 66 - 71
  • [7] ReJOOSp: Reinforcement Learning for Join Order Optimization in SPARQL
    Warnke, Benjamin
    Martens, Kevin
    Winker, Tobias
    Groppe, Sven
    Groppe, Jinghua
    Adhiyaman, Prasad
    Srinivasan, Sruthi
    Krishnakumar, Shridevi
    [J]. BIG DATA AND COGNITIVE COMPUTING, 2024, 8 (07)
  • [8] Tree-LSTM: Using LSTM to Encode Memory in Anatomical Tree Prediction from 3D Images
    Zhao, Mengliu
    Hamarneh, Ghassan
    [J]. MACHINE LEARNING IN MEDICAL IMAGING (MLMI 2019), 2019, 11861 : 637 - 645
  • [9] Biomedical Event Extraction Based on Knowledge-driven Tree-LSTM
    Li, Diya
    Huang, Lifu
    Ji, Heng
    Han, Jiawei
    [J]. 2019 CONFERENCE OF THE NORTH AMERICAN CHAPTER OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS: HUMAN LANGUAGE TECHNOLOGIES (NAACL HLT 2019), VOL. 1, 2019, : 1421 - 1430
  • [10] An enhanced Tree-LSTM architecture for sentence semantic modeling using typed dependencies
    Kleenankandy, Jeena
    Nazeer, Abdul K. A.
    [J]. INFORMATION PROCESSING & MANAGEMENT, 2020, 57 (06)