Reinforcement Learning for Join Order Optimization in PostgreSQL: Query Rewriting and Evaluation on JOB and TPC-H Benchmarks
Journal of Applied Science and Technology Trends · 19.04.2026 · 46-54
DOI: 10.38094/jastt7031087 ↗Kurz gefasst
Fachartikel in der Zeitschrift Journal of Applied Science and Technology Trends, online erschienen am 19.04.2026. Verfasst von Mohammed Omar und 1 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY-NC-SA 4.0).
Abstract (Originalsprache)
Join order optimization is a critical combinatorial problem in query processing. This paper applies reinforcement learning (RL) techniques to the join order optimization task in PostgreSQL by implementing and evaluating three separate RL-based optimizers: Proximal Policy Optimization (PPO), Deep Q-Network (DQN), and Advantage Actor-Critic (A2C). Each method is trained on the Join Order Benchmark (JOB) and evaluated on both JOB and TPC-H workloads. Performance is compared against PostgreSQL’s default planner without join reordering (PG-Old) and the built-in PostgreSQL optimizer with reordering enabled (PG-Join). Results show that RL-based methods significantly reduce execution times compared to PG-Old and often perform on par with or better than PG-Join, especially for complex multi-join queries. Among the tested methods, PPO achieves the most consistent improvements, with up to 4.47× average speedup over PG-Old on JOB and measurable gains on TPC-H. These findings demonstrate the potential of reinforcement learning as a practical and adaptive approach to join order optimization in relational databases.
Zitieren
APA
Omar, M., & Ahmed, N. (2026). Reinforcement Learning for Join Order Optimization in PostgreSQL: Query Rewriting and Evaluation on JOB and TPC-H Benchmarks. Journal of Applied Science and Technology Trends, 46-54. https://doi.org/10.38094/jastt7031087
Vancouver
Omar M, Ahmed N. Reinforcement Learning for Join Order Optimization in PostgreSQL: Query Rewriting and Evaluation on JOB and TPC-H Benchmarks. Journal of Applied Science and Technology Trends. 2026:46-54. doi:10.38094/jastt7031087
BibTeX
@article{Omar2026,
author = {Omar, Mohammed and Ahmed, Nawzat},
title = {Reinforcement Learning for Join Order Optimization in PostgreSQL: Query Rewriting and Evaluation on JOB and TPC-H Benchmarks},
journal = {Journal of Applied Science and Technology Trends},
year = {2026},
pages = {46--54},
doi = {10.38094/jastt7031087}
}
EUVIMED