Reinforcement learning with tree-LSTM for join order selection

Xiang Yu, Guoliang Li*, Chengliang Chai, Nan Tang

*此作品的通讯作者

科研成果: 书/报告/会议事项章节会议稿件同行评审

115 引用 (Scopus)

摘要

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 handtuned 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 short-term 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.

源语言英语
主期刊名Proceedings - 2020 IEEE 36th International Conference on Data Engineering, ICDE 2020
出版商IEEE Computer Society
1297-1308
页数12
ISBN(电子版)9781728129037
DOI
出版状态已出版 - 4月 2020
已对外发布
活动36th IEEE International Conference on Data Engineering, ICDE 2020 - Dallas, 美国
期限: 20 4月 202024 4月 2020

出版系列

姓名Proceedings - International Conference on Data Engineering
2020-April
ISSN(印刷版)1084-4627

会议

会议36th IEEE International Conference on Data Engineering, ICDE 2020
国家/地区美国
Dallas
时期20/04/2024/04/20

指纹

探究 'Reinforcement learning with tree-LSTM for join order selection' 的科研主题。它们共同构成独一无二的指纹。

引用此