Paper Title: A hybrid heuristic–reinforcement learning method for multi-table join optimization in cloud-native databases
Authors: Huichen Ma, Shaochun Liu
Corresponding Author: Huichen Ma (huichenm_research@163.com)/ USA
Abstract
Multi-table join optimization in cloud-native databases faces challenges of storage-compute separation, resource elasticity, and runtime cost variation that classic optimizers cannot handle, which drives the need for methods able to adjust their decision boundaries according to the runtime behavior of the underlying cloud infrastructure. The proposed hybrid architecture freezes the stable sub-components of an IKKBZ-GOO heuristic seed plan into a structural freeze mask that constrains the learning algorithm throughout training, rather than being discarded after a single warm-start iteration. The mask works together with a state-aware cost function whose single state-dependent parameter is updated online. Two further components complete the design: a logistic gate trained on production telemetry, and a regression containment strategy that falls back to the heuristic plan when the learned plan underperforms. Training converges in 6.4 hours on one 16-vCPU compute node without GPU acceleration. The method was evaluated on the Join Order Benchmark, TPC-H, and TPC-DS, with PostgreSQL running on an eight-node Kubernetes cluster with object-store-backed shared storage. It achieves a geometric mean speedup of 1.38-fold on JOB, 1.28-fold on TPC-DS, and 1.07-fold on TPC-H, produces a query plan in 4.6 to 6.4 ms, returns median latency to within 5% of its pre-scaling value within 22 seconds of a scaling event, and incurs a 21% overhead at the 95th percentile under node jitter. These findings demonstrate that heuristic and machine-learning components can be integrated to yield a usable optimizer whose decision boundaries adapt to the environment in which it is deployed.