Chrome Extension
WeChat Mini Program
Use on ChatGLM

Leveraging Query Logs and Machine Learning for Parametric Query Optimization.

Proc. VLDB Endow.(2021)

Cited 5|Views4
No score
Abstract
Parametric query optimization (PQO) must address two problems: identify a relatively small number of plans to cache for a parameterized query (populateCache), and efficiently select the best cached plan to use for executing any instance of the parameterized query (get Plan). Our approach decouples these two decisions. We formulate populateCache as an optimization problem with the goal of identifying a set of plans that minimizes the optimizer estimated cost of queries in the log, and present an efficient algorithm. For getPlan, we leverage query logs to train machine learning (ML) models to choose the lowest optimizer-estimated cost plan from the cached plans. We conduct extensive experiments using complex parameterized queries from benchmarks and real workloads. Our algorithm for populateCache achieves low geometric mean sub-optimality (1.2) even for complex queries using relatively few plans, and scales well to large query logs. The mean latency of our ML model based getPlan technique (similar to 210 mu sec) is between one to four orders of magnitude faster compared to prior PQO techniques. The mean sub-optimality is low (1.05), and the 95th percentile sub-optimality (1.3) is between 1.1x and 25x lower compared to prior techniques. Finally, we present an efficient algorithm for get Plan that leverages execution time information in query logs to circumvent inaccuracies of the query optimizer's cost estimates.
More
Translated text
Key words
Top-k Query Processing,Large-Scale Optimization,Approximation Algorithms,Parallel Algorithms
AI Read Science
Must-Reading Tree
Example
Generate MRT to find the research sequence of this paper
Chat Paper
Summary is being generated by the instructions you defined