🤖 AI Summary
Existing learning-based Monte Carlo Tree Search (MCTS) approaches for query optimization exhibit limited generalization under diverse workloads and struggle to consistently reproduce performance gains. This work identifies their out-of-distribution generalization shortcomings through a reproducibility study and proposes a novel MCTS framework that eschews end-to-end learning entirely, relying solely on the database’s built-in cost model. To enhance search efficiency and robustness, the framework incorporates a new Extreme UCT selection strategy. Evaluated on the Join Order Benchmark (JOB) and its more complex extension, JOB-Complex, the proposed method significantly outperforms learning-based MCTS optimizers such as AlphaJoin and HyperQO, and further surpasses state-of-the-art industrial query optimizers in complex join scenarios.
📝 Abstract
Monte Carlo Tree Search (MCTS) has been proposed as a transformative approach to join-order optimization in database query processing, with recent frameworks such as AlphaJoin and HyperQO claiming to outperform traditional methods. However, the fact that these frameworks rely on learned cost models raises concerns related to generalizability and deployment readiness. This paper presents a comprehensive reproducibility study of these methods, revealing that they often fail to support the claimed performance gains when subjected to diverse workloads.
Through an ablation study, we diagnose the root cause of this instability: while the MCTS search strategy is effective, the accompanying learned cost models suffer from severe out-of-distribution generalization errors.
Addressing this, we propose a novel MCTS framework. Unlike prior methods that rely on unstable learned components, our approach utilizes the database standard internal cost model, augmented by a new Extreme UCT (Upper Confidence Bound applied to Trees) selection policy to navigate the search space more robustly. We benchmark our method against the original AlphaJoin and HyperQO, as well as industry-standard baselines including Dynamic Programming (DP) and Genetic Query Optimization (GEQO), using the well-known Join Order Benchmark (JOB) and the new JOB-Complex benchmark. The results demonstrate that our approach outperforms learned MCTS methods and achieves superiority over a SOTA query optimizer in complex join scenarios on real-world data. We release the full implementation and experimental artifacts to support further research.