LOGER: A Learned Optimizer towards Generating Efficient and Robust Query Execution Plans

被引:11
|
作者
Chen, Tianyi [1 ]
Gao, Jun [1 ]
Chen, Hedui [2 ]
Tu, Yaofeng [2 ]
机构
[1] Peking Univ, Key Lab High Confidence Software Technol, CS, Beijing, Peoples R China
[2] ZTE Corp, Shenzhen, Peoples R China
来源
PROCEEDINGS OF THE VLDB ENDOWMENT | 2023年 / 16卷 / 07期
关键词
D O I
10.14778/3587136.3587150
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Query optimization based on deep reinforcement learning (DRL) has become a hot research topic recently. Despite the achieved promising progress, DRL optimizers still face great challenges of robustly producing efficient plans, due to the vast search space for both join order and operator selection and the highly varying execution latency taken as the feedback signal. In this paper, we propose LOGER, a learned optimizer towards generating efficient and robust plans, aiming at producing both efficient join orders and operators. LOGER first utilizes Graph Transformer to capture relationships between tables and predicates. Then, the search space is reorganized, in which LOGER learns to restrict specific operators instead of directly selecting one for each join, while utilizing DBMS built-in optimizer to select physical operators under the restrictions. Such a strategy exploits expert knowledge to improve the robustness of plan generation while offering sufficient plan search flexibility. Furthermore, LOGER introduces epsilon-beam search, which keeps multiple search paths that preserve promising plans while performing guided exploration. Finally, LOGER introduces a loss function with reward weighting to further enhance performance robustness by reducing the fluctuation caused by poor operators, and log transformation to compress the range of rewards. We conduct experiments on Join Order Benchmark (JOB), TPC-DS and Stack Overflow, and demonstrate that LOGER can achieve a performance better than existing learned query optimizers, with a 2.07x speedup on JOB compared with PostgreSQL.
引用
收藏
页码:1777 / 1789
页数:13
相关论文
共 10 条
  • [1] AlphaQO: Robust Learned Query Optimizer
    Yu X.
    Chai C.-L.
    Zhang X.-N.
    Tang N.
    Sun J.
    Li G.-L.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (03): : 814 - 831
  • [2] Generating Custom Learned Cost Model for Query Optimizer of DBMS
    Ouared, Abdelkader
    Amrani, Moussa
    Schobbens, Pierre-Yves
    MODEL-DRIVEN ENGINEERING AND SOFTWARE DEVELOPMENT, MODELSWARD 2023, 2024, 2106 : 29 - 53
  • [3] Counting, enumerating, and sampling of execution plans in a cost-based query optimizer
    Waas, F
    Galindo-Legaria, C
    SIGMOD RECORD, 2000, 29 (02) : 499 - 509
  • [4] Generating Power-Efficient Query Execution Plan
    Liu, Xiaowei
    Wang, Jinbao
    Wang, Haijie
    Gao, Hong
    PROCEEDINGS OF THE 2ND INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTER SCIENCE AND ENGINEERING (CSE 2013), 2013, 42 : 284 - 288
  • [5] Generating efficient safe query plans for probabilistic databases
    Qin, Biao
    Xia, Yuni
    DATA & KNOWLEDGE ENGINEERING, 2008, 67 (03) : 485 - 503
  • [6] Generating custom code for efficient query execution on heterogeneous processors
    Sebastian Breß
    Bastian Köcher
    Henning Funke
    Steffen Zeuch
    Tilmann Rabl
    Volker Markl
    The VLDB Journal, 2018, 27 : 797 - 822
  • [7] Generating custom code for efficient query execution on heterogeneous processors
    Bress, Sebastian
    Koecher, Bastian
    Funke, Henning
    Zeuch, Steffen
    Rabl, Tilmann
    Markl, Volker
    VLDB JOURNAL, 2018, 27 (06): : 797 - 822
  • [8] Towards robust and efficient planning execution
    Verstraete, Paul
    Valckenaers, P.
    Van Brussel, H.
    Saint Germain, B.
    Hadeli, K.
    Van Belle, J.
    ENGINEERING APPLICATIONS OF ARTIFICIAL INTELLIGENCE, 2008, 21 (03) : 304 - 314
  • [9] Generating Efficient Execution Plans for Vertically Partitioned XML Databases
    Kling, Patrick
    Oezsu, M. Tamer
    Daudjee, Khuzaima
    PROCEEDINGS OF THE VLDB ENDOWMENT, 2010, 4 (01): : 1 - 11
  • [10] Towards Enhancing Database Education: Natural Language Generation Meets Query Execution Plans
    Wang, Weiguo
    Bhowmick, Sourav S.
    Li, Hui
    Joty, Shafiq
    Liu, Siyuan
    Chen, Peng
    SIGMOD '21: PROCEEDINGS OF THE 2021 INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA, 2021, : 1933 - 1945