30
0

Roq: Robust Query Optimization Based on a Risk-aware Learned Cost Model

Abstract

Query optimizers in RDBMSs search for execution plans expected to be optimal for given queries. They use parameter estimates, often inaccurate, and make assumptions that may not hold in practice. Consequently, they may select plans that are suboptimal at runtime, if estimates and assumptions are not valid. Therefore, they do not sufficiently support robust query optimization. Using ML to improve data systems has shown promising results for query optimization. Inspired by this, we propose Robust Query Optimizer, (Roq), a holistic framework based on a risk-aware learning approach. Roq includes a novel formalization of the notion of robustness in the context of query optimization and a principled approach for its quantification and measurement based on approximate probabilistic ML. It also includes novel strategies and algorithms for query plan evaluation and selection. Roq includes a novel learned cost model that is designed to predict the cost of query execution and the associated risks and performs query optimization accordingly. We demonstrate that Roq provides significant improvements in robust query optimization compared with the state-of-the-art.

View on arXiv
@article{kamali2025_2401.15210,
  title={ Roq: Robust Query Optimization Based on a Risk-aware Learned Cost Model },
  author={ Amin Kamali and Verena Kantere and Calisto Zuzarte and Vincent Corvinelli },
  journal={arXiv preprint arXiv:2401.15210},
  year={ 2025 }
}
Comments on this paper