🤖 AI Summary
Query-level parameter tuning for analytical query engines faces three key challenges: (1) inaccurate modeling of how parameters affect query plans and performance; (2) neglect of query failures during optimization, reducing convergence efficiency; and (3) slow cold-start adaptation for unseen queries. This paper proposes a novel joint optimization framework. First, it introduces an attention-driven plan-parameter joint encoder that explicitly captures the coupling between configuration parameters and physical execution plans. Second, it designs a dual-task neural process model to jointly learn the distribution of query latency and failure probability. Third, it integrates particle swarm optimization to guide the initial sampling of Bayesian optimization, accelerating cold-start convergence. Extensive experiments demonstrate that our approach achieves up to 23.7% reduction in query latency and 51.2% lower query failure rate compared to state-of-the-art methods.
📝 Abstract
Modern analytical query engines (AQEs) are essential for large-scale data analysis and processing. These systems usually provide numerous query-level tunable knobs that significantly affect individual query performance. While several studies have explored automatic DBMS configuration tuning, they have several limitations to handle query-level tuning. Firstly, they fail to capture how knobs influence query plans, which directly affect query performance. Secondly, they overlook query failures during the tuning processing, resulting in low tuning efficiency. Thirdly, they struggle with cold-start problems for new queries, leading to prolonged tuning time. To address these challenges, we propose AQETuner, a novel Bayesian Optimization-based system tailored for reliable query-level knob tuning in AQEs. AQETuner first applies the attention mechanisms to jointly encode the knobs and plan query, effectively identifying the impact of knobs on plan nodes. Then, AQETuner employs a dual-task Neural Process to predict both query performance and failures, leveraging their interactions to guide the tuning process. Furthermore, AQETuner utilizes Particle Swarm Optimization to efficiently generate high-quality samples in parallel during the initial tuning stage for the new queries. Experimental results show that AQETuner significantly outperforms existing methods, reducing query latency by up to 23.7% and query failures by up to 51.2%.