arrow
Return

Learning Execution Plan Embeddings for Multi-Dimensional Query Resource Prediction

delete2026-03-04
delete0
delete
OA
AI
M
Mahendran Vasagam
A
Ashok Kumar
A
Anshul Garg
DOI:10.1109/ACCESS.2026.3670242delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

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

IEEE Access cover
IEEE Access
IF:
3.6
Papers:
9.8W
Citations:
29.4W

Organization

I
independent researcher
Scholars:
732
Papers: 652
Citations: 0
Cited Papers

Cited Papers

QueryFormer
err2022-06-22
err0
PREAI
errYue Zhao; Gao Cong; Jiachen Shi; Chunyan Miao
errShare
errSave
DeepDB
err2020-03-26
err0
PREAI
errBenjamin Hilprecht; Andreas Schmidt; Moritz Kulessa; Alejandro Molina; Kristian Kersting; Carsten Binnig
errShare
errSave
ARIES
err1992-03-01
err0
errOAAI
errC. Mohan; Don Haderle; Bruce Lindsay; Hamid Pirahesh; Peter Schwarz
errShare
errSave
errShare
errSave
Learning-based Query Performance Modeling and Prediction
err2012-04-01
err0
errOAAI
errMert Akdere; Ugur Çetintemel; Matteo Riondato; Eli Upfal; Stanley B. Zdonik
errShare
errSave
Bao: Making Learned Query Optimization Practical
err2021-06-18
err0
errOAAI
errRyan Marcus; Parimarjan Negi; Hongzi Mao; Nesime Tatbul; Mohammad Alizadeh; Tim Kraska
errShare
errSave
Flow-loss
err2021-10-27
err0
PREAI
errParimarjan Negi; Ryan Marcus; Andreas Kipf; Hongzi Mao; Nesime Tatbul; Tim Kraska; Mohammad Alizadeh
errShare
errSave
Presto: SQL on Everything
err2019-04-01
err0
PREAI
errRaghav Sethi; Martin Traverso; Dain Sundstrom; David Phillips; Wenlei Xie; Yutian Sun; Nezih Yegitbasi; Haozhun Jin; Eric Hwang; Nileema Shingte; Christopher Berner
errShare
errSave
researcher View more