Join order selection is a sub-field of query optimization that aims to find the optimal join order for an SQL query with the minimum cost. The challenge lies in the exponentially growing search space as the number of tables increases, making exhaustive enumeration impractical. Traditional optimizers use static heuristics to prune the search space, but they often fail to adapt to changes or improve based on feedback from the DBMS. Recent research addresses these limitations with Deep Reinforcement Learning (DRL), allowing models to use feedback to dynamically search for better join orders and enhance performance over time. Existing research primarily focuses on capturing join order sequences and their representations at various levels, with limited comparative analysis of reinforcement learning methods. In this paper, we propose GTDD, a novel framework that integrates Graph Neural Networks (GNN), Treestructured Long Short-Term Memory (Tree LSTM), and DuelingDQN. We conduct a series of experiments that demonstrate a clear advantage of GTDD over state-of the-art techniques.
翻译:连接顺序选择是查询优化的一个子领域,旨在为SQL查询找到具有最小成本的最优连接顺序。其挑战在于,随着表数量的增加,搜索空间呈指数级增长,使得穷举枚举变得不切实际。传统优化器使用静态启发式方法来剪枝搜索空间,但它们通常无法适应变化或基于数据库管理系统的反馈进行改进。近期研究通过深度强化学习(DRL)解决了这些局限性,使模型能够利用反馈动态搜索更好的连接顺序,并随时间推移提升性能。现有研究主要侧重于捕获不同层级的连接顺序序列及其表示,而对强化学习方法的比较分析有限。本文提出了一种新颖的框架GTDD,它整合了图神经网络(GNN)、树结构长短期记忆网络(Tree LSTM)以及DuelingDQN。我们进行了一系列实验,结果表明GTDD相较于现有最先进技术具有明显优势。