"What makes my queries slow?": Subgroup Discovery for SQL Workload Analysis
Youcef Remil, Anes Bendimerad, Romain Mathonat, Philippe Chaleat, Mehdi Kaytoue
Abstract
Among daily tasks of database administrators (DBAs), the analysis of query workloads to identify schema issues and improving performances is crucial. Although DBAs can easily pinpoint queries repeatedly causing performance issues, it remains challenging to automatically identify subsets of queries that share some properties only (a pattern) and simultaneously foster some target measures, such as execution time. Patterns are defined on combinations of query clauses, environment variables, database alerts and metrics and help answer questions like what makes SQL queries slow? What makes I/O communications high? Automatically discovering these patterns in a huge search space and providing them as hypotheses for helping to localize issues and root-causes is important in the context of explainable AI. To tackle it, we introduce an original approach rooted on Subgroup Discovery. We show how to instantiate and develop this generic data-mining framework to identify potential causes of SQL workloads issues. We believe that such data-mining technique is not trivial to apply for DBAs. As such, we also provide a visualization tool for interactive knowledge discovery. We analyse a one week workload from hundreds of databases from our company, make both the dataset and source code available, and experimentally show that insightful hypotheses can be discovered.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f34545b1-d039-4c79-bbe7-2b1d121940feCited by top-tier papers2
- LearnedSQLGen: Constraint-aware SQL Generation using Reinforcement LearningLixi Zhang, Chengliang Chai, Xuanhe Zhou, Guoliang LiSIGMOD 2022 · 26 citations
- Subgroup Discovery with Small and Alternative Feature SetsJakob BachSIGMOD 2025 · 4 citations
Builds on2
Related papers
- Diagnosing Root Causes of Intermittent Slow Queries in Large-Scale Cloud DatabasesMinghua Ma, Zheng Yin, Shenglin Zhang, Sheng Wang et al.VLDB 2020 · 119 citations
- Summarized Causal Explanations For Aggregate ViewsBrit Youngmann, Michael J. Cafarella, Amir Gilad, Sudeepa RoySIGMOD 2024 · 12 citations
- On Explaining Confounding BiasBrit Youngmann, Michael J. Cafarella, Yuval Moskovitch, Babak SalimiICDE 2023 · 7 citations
- Database Benchmarking for Supporting Real-Time Interactive Querying of Large DataLeilani Battle, Philipp Eichmann, Marco Angelini, Tiziana Catarci et al.SIGMOD 2020 · 35 citations
- Understanding and Detecting Query Performance Regression in Practical Index Tuning: [Experiments & Analysis]Wentao Wu, Anshuman Dutt, Gaoxiang Xu, Vivek R. Narasayya et al.SIGMOD 2026
