Return
Learning Execution Plan Embeddings for Multi-Dimensional Query Resource Prediction
DOI:10.1109/ACCESS.2026.3670242.png)
Abstract
En 中文
Multi-cluster query engines are common in production, but routing queries to appropriately-sized clusters remains an unsolved problem. Current approaches like round-robin, hash-based routing, or manual rules waste resources when simple queries land on oversized clusters and cause failures when complex queries hit undersized ones. Production systems experience resource mismatch failures, requiring manual workarounds such as migrating problematic queries to separate engines. We address this with a system for intelligent cluster sizing using learned execution plan embeddings to predict query resource requirements. Instead of analyzing query text, we vectorize execution plan structure and search for similar historical queries, predicting memory, Central Processing Unit (CPU) and runtime based on actual past performance rather than unreliable optimizer estimates. We employ a tiered inference strategy that supports fast, feature-based vectors (10 basic dimensions; 13–23 ms overhead), gradient boosting with enhanced features (24 dimensions; 76.5% accuracy), and graph neural network embeddings for complex queries (78.1% accuracy). An adaptive classifier maps predictions to cluster sizes using thresholds that adjust based on observed utilization patterns. Unfamiliar queries are routed conservatively, and the system automatically improves from observed outcomes. Empirical validation on 2,954 queries from a Trino deployment shows 98.8–99.8% within-one-size accuracy and 74.8–76.5% exact-match routing. In benchmark workloads, our approach reduces out-of-memory failures by 82% and infrastructure costs by 33%, with less than 51 ms of routing overhead. Gradient boosting achieves 76.5% accuracy, while graph neural networks reach 78.1% for complex join structures.
Keywords:
Approximate nearest neighbor search
distributed query engines
graph neural networks
learned cost models
multi-cluster routing
query performance prediction
vector embeddings
Journal
IF:
3.6
Papers:
9.8W
Citations:
29.4W

