Manuscript Offprint
arXiv:2608.23402EXPLAIN Yourself! Finding Query Planner Stalls Across DBMSes
Abstract
Query planners are typically expected to produce optimized plans quickly, leading many researchers (including the authors of this paper) and practitioners to design systems that assume query planning is a low-cost operation. Using a lightweight agentic search, we show that this assumption does not always hold. Across seven DBMSes, including four commercial systems, we find at least one query per system that takes more than three minutes to plan. In addition to being slow to plan, such queries risk tying up database resources without performing useful work, creating a potential denial-of-service vector. We analyze the queries our search uncovers and compare how the seven systems respond to each pattern. We find that although the queries triggering slow planning are largely DBMS-specific, recurring pathologies involving correlated subqueries, CTE expansion, repeated subquery expressions, disjunctive joins, and constant folding affect multiple systems. We release our uncovered queries along with a curated suite of parameterized query pathologies that researchers and database engineers can use to test planner robustness. Overall, our results show that query planning cannot always be treated as a predictably inexpensive operation and that its latency and robustness deserve further attention from both database researchers and engineers.
1 Introduction
Query planners are designed to quickly produce physical plans. Recently, researchers (including the authors of this paper) and practitioners have treated this design goal as an assumption, developing components that assume query plans can be cheaply generated. For example, learned cost models and query run time predictors, which are used to make time-sensitive decisions such as query scheduling, featurize physical query plans in order to make their predictions. This is not only an academic assumption; production-grade schedulers like Auto-WLM and query performance predictors like Stage both rely on featurizing query plans and making fast decisions under single-digit milliseconds .
Unfortunately, this assumption is unsafe in practice. Consider the query shown in Listing 1. Despite taking only 6 milliseconds to plan on DuckDB, this query takes over 14 minutes to plan on an unnamed [25] commercial database system, whose vendor is aware of this behavior. This example shows how even a conceptually simple query can take surprisingly long to plan in practice.
We call such instances of slow query planning a query planner stall. In addition to delaying query execution, stalls raise system robustness concerns because the planner may consume substantial CPU time or memory before even executing the query. Furthermore, a malicious user could expend planner resources simply by issuing adversarial EXPLAIN commands, creating a potential denial-of-service risk: a risk amplified by agentic workloads which are expected to issue arbitrary and novel queries. Planner stalls
SELECT COUNT(*) FROM lineitem AS 11 WHERE EXISTS (SELECT 1 FROM lineitem AS 12 WHERE 12.1_orderkey = 11.1_orderkey AND 12.1_suppkey <> 11.1_suppkey) AND NOT EXISTS (SELECT 1 FROM lineitem AS 13 WHERE 13.1_suppkey <> 11.1_suppkey AND 13.1_receiptdate > 13.1_commitdate AND 13.1_orderkey = 11.1_orderkey)
Listing 1. This TPC-H-derived query takes about 14 minutes to EXPLAIN on DBMS A, but 6 milliseconds on DuckDB.
could thus threaten robustness even when no user intentionally constructs an adversarial query.
In this work, we demonstrate that stalls occur across diverse DBMSes and can be easily generated: we give an LLM agent a single tool that measures the planning time of a submitted SQL query and ask it to find slow-planning queries. Despite the simplicity of this approach, the agent uncovers planner stalls on all seven DBMSes we tested, including four commercial systems. On all seven systems, we find at least one query that takes more than three minutes to plan. Some of the queries we find are not obviously contrived or adversarial; indeed, we encountered one such query incidentally while investigating an unrelated problem . Our results suggest that query planner stalls are not just an isolated problem in a single DBMS, but rather a recurring phenomenon across many modern, production-grade DBMSes.
We study the queries uncovered by our agent and identify recurring pathologies involving correlated subqueries, CTEs, repeated subquery expressions, disjunctive joins, and constant folding. Across these cases, we find that planner transformations and search procedures can cause planning time to grow sharply, and sometimes exponentially, as modest amounts of query structure are added. Which patterns trigger stalls varies across DBMSes, suggesting that these queries are not necessarily fundamentally difficult to plan, but instead expose problematic cases in a specific planner's optimization strategy or implementation.
Looking broadly, our findings motivate future research on practical query planner robustness. A robust query planner should guarantee that it produces a usable plan within a bounded time, degrade gracefully when optimization becomes difficult, and resist adversarial inputs that trigger pathological planning behavior. Similarly, downstream systems that rely on physical plans should tolerate delayed or unavailable plans. Toward this goal, we contribute (i) an analysis of query pathologies that lead to planner stalls on existing DBMSes, and (ii) our uncovered queries, along with a suite of parameterized query pathology families distilled from our analysis, for testing planner robustness. We will also release the lightweight agentic search tool we used to find the queries.
https://github.com/geoffxy/explain-yourself/

Figure 1: An overview of our agentic search procedure.
2.1 Search Procedure
We deliberately use a simple agentic search procedure to find query planner stalls; our focus is on the resulting planner behaviors rather than the search procedure itself. We provide an LLM with a single tool that, given a SQL query, measures and returns the query planning time on the database system being tested . We then instruct the LLM to use the tool to find and return as many queries as it can whose planning time exceeds some threshold (e.g., 3 minutes). If the LLM returns queries whose times do not exceed a minimum planning time threshold (5 seconds in our experiments), we instruct it to try again. Otherwise, we save the qualifying queries and start a new search attempt. We run this search for N turns (we use N = 200 in our experiments); one turn corresponds to one LLM call.
De-duplication. When the search agent finds queries , we de-duplicate them to (i) avoid storing structurally similar queries, and (ii) to discourage re-discovering known patterns. De-duplicating is nontrivial: exact or fuzzy SQL equality may not match syntactically different queries that stress the same planner behavior.
We represent each query using a feature vector containing its numbers of AST nodes, joins, CTEs, window functions, aggregations, predicates, and set operations. We then consider two queries similar when their vectors' cosine similarity is at least . We use this threshold to gather queries into clusters and take the query with the longest observed planning time from each cluster. We use cosine similarity to cluster queries with similar structural shapes even when they contain proportionally different numbers of operations.
We also use this similarity test during the search. Before timing a candidate query , the timing tool compares it with previously found queries ©. If has a cosine similarity at least with any archived query, the tool reports that it is too similar to a known query, prompting the agent to explore a different candidate.
Query bank. Cosine similarity produces an inexpensive first-pass clustering, but some semantically similar queries may still end up in different clusters. To refine this clustering, we use an LLM judge to assign a semantic similarity score to every pair of remaining queries. We then group queries such that every pair within a group has (D). We use on a five-point scale, where 5 indicates that two queries are identical. Finally, we manually remove queries expected to be slow to plan because they only join excessively many tables or compute a CUBE over many columns.
Database systems. We test seven database systems, four of which are commercial systems. We list the DBMSes in Table 1, anonymized when necessary [25], with a description of their design and intended workload. We run the commercial DBMSes in the cloud, each with 4 vCPUs and 32 GiB of memory. We use the default configuration on each DBMS. We obtain a query's planning time on a DBMS by measuring how long the DBMS takes to complete an EXPLAIN command (or its equivalent) for that query.
Table 1: The database systems tested in this work.
| System | Commercial? | Design and intended workload |
|---|---|---|
| DBMS A | Yes | Distributed analytical database |
| DBMS B | Yes | Single-node, transactions and analytics |
| DBMS C | Yes | Single-node, transactions and analytics |
| DBMS D | Yes | Single-node, transactional |
| DuckDB | No | Embedded in-process, in-memory analytics |
| MySQL | No | Single-node, transactional |
| PostgreSQL | No | Single-node, transactional |

Figure 2: Number of distinct query patterns found to take beyond increasing thresholds of time to plan.
Dataset. We run our experiments on TPC-H data [33] using scale factor 100. We use this dataset for its familiarity within the database community. However, note that none of the pathologies described in this work are specific to TPC-H.
2.2 Search Results
We use GPT-5.5 as our search agent, and GPT-5.4 Nano as our similarity judge to reduce cost. We run our search agent with a slow threshold of 3 minutes, 1 minute, and 30 seconds. Figure 2 shows the number of queries we find exceeding these planning time thresholds (in log scale). We make the following observations.
Query planner stalls occur on all seven DBMSes; stalls are not localized problems specific to one database system. We find at least one query that took over 3 minutes to plan on each DBMS. At the upper threshold of 3 minutes, DBMS C, DuckDB, and PostgreSQL admit the fewest slow-planning queries (one query) whereas DBMS A admits the most (25 queries).
The discovered query planner stalls vary in count and severity across the DBMSes. DBMS A, DBMS D, and MySQL retain many slow-planning queries as we increase the threshold from 5 seconds to 3 minutes, indicating a substantial tail. In contrast, DBMS C, DBMS B, DuckDB, and PostgreSQL exhibit a similar number of queries with planning times above 5 seconds, but their counts decline sharply as the slow threshold increases.
We note that these results reflect the query patterns that our search agent discovered and they should not be interpreted as a

Figure 3: A cross-system evaluation of the slow-planning queries our search tool found. Columns show queries grouped by the DBMS where they were discovered; rows show the DBMS used to plan them. The cell colors indicate planning latency or failure. A few queries transfer across DBMSes, but most seem to only trigger slow planning behavior on their discovery system.
ranking of the DBMSes' quality. While differences across DBMSes could reflect their susceptibility to planner stalls, they could also be due to biases in the queries explored by our search agent.
2.3 Do Planner Stalls Transfer Across Systems?
Next, we see if a query found to trigger slow planning on one DBMS also triggers a stall on other DBMSes. We take each query that our search agent found on one DBMS and measure its planning time on the six other DBMSes, translating SQL dialects as needed. Figure 3 shows our results. The columns represent each query found on each corresponding DBMS. The rows represent the DBMS on which we measured the planning time; the diagonal, outlined in black, represents queries planned on the same DBMS on which they were discovered. Gray boxes indicate the query is unsupported on the DBMS; this usually means the query uses a feature (e.g., a function) that the other DBMS does not support.
Most slow-planning queries are specific to the DBMS on which they were discovered. This is most noticeable on DBMS A and MySQL, as the darkest cells are along the diagonal whereas most of the corresponding cells on the other DBMSes are green. In other words, queries that take minutes to plan on one system often plan in under five seconds elsewhere. This finding suggests that stalls are likely due to DBMS-specific planner behavior, rather than queries that are fundamentally difficult to plan.
Nevertheless, there do exist queries found on one DBMS that are also slow to plan on others. For example, queries 2–4 on DBMS B also lead to timeouts on DBMS A and MySQL. We see similar examples on the other six DBMSes.
3 Query Planner Pathologies
Although most slow-planning queries are specific to the DBMS on which they were discovered, we do see a few pathological query patterns that affect more than one DBMS. We look at five such pathologies in more detail next, starting with correlated subqueries.
3.1 Correlated Subqueries
Correlated subqueries are subqueries that reference columns from an outer query and planners generally try to decorrelate them [20].
SELECT COUNT(*) FROM lineitem AS 11 WHERE 11.1_receiptdate > 11.1_commitdate AND EXISTS ( SELECT 1 FROM lineitem AS 12 WHERE 12.1_orderkey = 11.1_orderkey -- Alternates between <> and = AND 12.1_suppkey <> 11.1_suppkey -- Alternates between l_receiptdate and l_shipdate AND 12.1_receiptdate > 12.1_commitdate ) AND EXISTS ( ... ) ...
Listing 2. The correlated subquery pathology. We vary the number of EXISTS ( ... ) predicates from 0 to 15.

Figure 4: DBMS A and MySQL exhibit sharp increases in planning times as the number of correlated subqueries increases.
Listing 2 shows a recurring pathology in our search, which comprises correlated subqueries inside EXISTS filter predicates. To study how this pathology affects planning performance, we plan the query on all seven DBMSes while increasing the number of correlated subqueries from 1 to 15. We construct each query variant by adding copies of the EXISTS predicate, alternating between the comparators and columns in the correlated and non-correlated predicates respectively. Figure 4 shows our results using a three-minute planning timeout. Both DBMS A and MySQL are affected: DBMS A reaches the timeout with three correlated subqueries, while MySQL reaches it at 11. The other five DBMSes appear to be unaffected.
WITH v1 AS (SELECT r_regionkey AS rk FROM region WHERE r_regionkey = 0), v2 AS (SELECT i1.rk AS rk FROM v1 i1 JOIN v1 i2 ON i1.rk = i2.rk), v3 AS (SELECT i1.rk AS rk FROM v2 i1 JOIN v2 i2 ON i1.rk = i2.rk), ... SELECT * FROM vn
Listing 3. The CTE expansion pathology. Each CTE joins the previous CTE to itself and projects one column.
Why does this pathology occur? We investigated the planning slowdown by inspecting MySQL's planner code and its online documentation. MySQL optimizes this query pattern by converting the EXISTS subqueries into semi-joins and then enumerating join orders. By default, MySQL sets its "optimizer search depth" to 62 [23]. When this depth is greater than the number of tables in the query, it exhaustively searches the join-order space [24], which contains orderings for n tables. If we manually set the optimizer search depth to 1 or disable MySQL's semi-join optimizations, this query takes single-digit milliseconds to plan. Thus MySQL's sharp increase in planning time is because it performs exhaustive join order enumeration on this query. DBMS A is closed-source, so we cannot inspect its code to investigate why this pathology occurs.
3.2 Adversarial CTE Expansion
A second pathology that affects several DBMSes involves repeatedly referenced common table expressions (CTEs). Listing 3 shows a simplified query pattern that captures the core problem. The v1 CTE produces a single column and single row (there is exactly one row with r_regionkey = 0). Each subsequent CTE joins the previous CTE with itself and projects the first column. Despite its syntactic complexity, this query produces just a single value (0).
Figure 5 shows the query planning time as we increase the number of CTEs to 50, using a three-minute planning timeout. DuckDB and PostgreSQL maintain low planning times, while the other five DBMSes all eventually reach the planning timeout. DBMS B, DBMS D, and DBMS A reach timeouts around 10 CTEs whereas MySQL and DBMS C reach timeouts around 20 CTEs.
Why does this pathology occur? We investigate this pathology by examining DuckDB's and PostgreSQL's planning behavior. DuckDB and PostgreSQL avoid the planning-time blowup because they materialize CTEs by default [1, 2]. Under this strategy, the DBMS executes each CTE once, stores the result in an intermediate table, and then references that table in subsequent CTEs. By using dialect-specific keywords, Figure 6 compares planning times when we force DuckDB and PostgreSQL to materialize versus inline the CTEs. Inlining causes planning time to increase exponentially because each CTE references its predecessor twice, doubling the size of the query plan representation at each level.
3.3 Repeated Subquery Expressions
Our next pathology involves repeated join subexpressions, as shown in Listing 4. This query contains a subquery that joins the same table to itself ten times. We repeat this subquery up to 20 times and

Figure 5: All DBMSes except DuckDB and PostgreSQL exhibit increases in planning times as the number of CTEs increases.

Figure 6: DuckDB and PostgreSQL exhibit increases in planning times when we force CTE inlining.
SELECT (SELECT COUNT() FROM lineitem l1, ..., lineitem l11 WHERE l1.1_orderkey = l2.1_orderkey AND ... AND l10.1_orderkey = l11.1_orderkey) + (SELECT COUNT() FROM lineitem l1, ..., lineitem l11 WHERE l1.1_orderkey = l2.1_orderkey AND ... AND l10.1_orderkey = l11.1_orderkey) + ... AS total
Listing 4. The repeated join subexpression pathology. We vary the number of repetitions from 1 to 20.
measure the planning time across all seven DBMSes. Importantly, each subquery contains only a single eleven-table join graph, fewer tables than some queries in the Join Order Benchmark [13].
Figure 7 shows our results, again using a three-minute timeout. DBMS A and MySQL experience planning time increases as we increase the number of repetitions, timing out at two and six repetitions respectively. The other five DBMSes see modest increases in planning time, consistent with an increasing query size.
Why does this pathology occur? MySQL’s documented common-subexpression pass only targets boolean expressions [22]. We do not observe it re-using plans for these repeated scalar subqueries, meaning it likely plans each repeated subquery independently. Like the other pathologies, MySQL performs exhaustive join order enumeration by default; the single subquery instance is costly because it contains eleven tables. These two factors explain both the noticeable planning time with one repetition in Figure 7 and the linear increase as we add repetitions. DBMS A is closed-source, so we cannot inspect its code to investigate why this pathology occurs.

Figure 7: DBMS A and MySQL experience planning time increases as we repeat a join subquery.
SELECT COUNT(*) FROM partsupp a, partsupp b, ..., partsupp n WHERE (a.ps_partkey = b.ps_partkey OR a.ps_suppkey = b.ps_suppkey) AND (b.ps_partkey = ... OR b.ps_suppkey = ...) ... AND (n.ps_partkey = a.ps_partkey OR n.ps_suppkey = a.ps_suppkey) AND (a.ps_availqty > 100 OR c.ps_availqty > 100 OR ...)
Listing 5. The disjunctive join pathology. We vary the size of the join cycle up to 20 tables.
3.4 Disjunctive Joins
Another pathology we discovered involves joins whose conditions contain disjunctions (i.e., use OR). Listing 5 shows an example: we join up to N copies of the same table in a cycle, where the last table joins to the first table, and add a final disjunctive predicate. We study how the join size affects planning time by increasing the number of tables involved up to 20.
Figure 8 shows our results. Both DBMS C and MySQL exhibit planning time increases as the join cycle size increases. DBMS C times out on a query with 5 joins whereas MySQL times out at 14 joins. Notably, DBMS C's planning time drops after five joins. We hypothesize this drop occurs because an internal heuristic gives up on expensive planning beyond a certain query complexity.
Why does this pathology occur? We hypothesize that DBMS C applies cost-based query rewrites on the disjunctive predicates, which increases the number of plan candidates it considers. For example, it could split a disjunction into two subqueries and combine their results using a union. Because DBMS C is closed-source, we cannot inspect its code to identify the root cause. MySQL's planning time increases for the same reason as before: it performs exhaustive join order enumeration by default. Consequently, its planning time increases as the number of tables grows.
3.5 Adversarial Constant Folding
Finally, we examine constant folding, an example of which is in Listing 6. The slow-to-plan DuckDB and PostgreSQL queries in Figure 3 contain expensive constant expressions that both systems appear to evaluate during planning.
To study this behavior, we repeatedly add an expensive constant expression to either the SELECT list (“plan independent”) or

Figure 8: DBMS C and MySQL exhibit increases in planning times as we increase the size of the disjunctive join cycle. DBMS C reverts to fast planning beyond five joins.
-- May influence the physical plan (plan dependent) SELECT COUNT(*) FROM part WHERE p_partkey = ASCII(MD5(REPEAT('a', 30000000))) + ... -- Should not influence the physical plan (plan ← independent) SELECT ASCII(MD5(REPEAT('a', 30000000))) + ...
Listing 6. The constant folding pathology. Constant expressions may influence the physical plan or be independent.

Figure 9: Planning time as we vary the number of constant expressions in plan dependent and independent locations.
WHERE clause (“plan dependent”). Figure 9 shows our results. Because the DBMSes support different functions, we use a different expression on each system. Thus the absolute planning times and repetition counts are not directly comparable; we instead focus on how planning time changes within each DBMS.
Planning time grows with the repetition count on DBMS A, DuckDB, MySQL, and PostgreSQL, suggesting that these systems evaluate expressions during planning. MySQL appears to distinguish expressions that affect plan choice from those that do not: planning time grows when expressions appear in the WHERE clause, but remains stable when they appear in the SELECT list. DBMS B, DBMS C, and DBMS D show no planning time increases, suggesting that they do not execute these expressions during planning.
Constant folding during planning can improve query execution when an expression affects plan choice or its result can be reused. However, our results show that indiscriminately folding every constant expression can also stall the planner. Planners should consider the optimization benefit against the cost of folding during planning, particularly if the query may not be executed immediately.
4 Related Work
Query planner performance. OptMark [14] is a benchmark toolkit that evaluates query planning effectiveness and efficiency. It measures efficiency using logical counts, e.g., the number of join orders explored (among others), which correlates with optimization time. While OptMark is a methodology for comparing planners on efficiency, our work focuses on finding and analyzing pathological queries that cause long planning times. Ilyas et al. explore predicting query planning time, which might help avoid pathological queries [10]. Orthogonal work also proposes techniques to improve the performance of query planning [6–8, 21, 34].
Database performance bug finding. Prior works propose techniques for finding query execution performance bugs in database systems [4, 11, 12, 15, 35, 36]. The high-level idea is to identify a general property about a pair of queries (e.g., making a query more restrictive should result in an output cardinality estimate no larger than the original query [4]). Then, they generate query pairs and check if they satisfy the property and report a bug if not. Our work differs, as we identify and study queries that trigger query planner performance bugs (instead of query execution performance bugs).
Database correctness bug finding. A complementary set of papers propose techniques to find correctness bugs in database systems [3, 5, 16, 27–29, 40], applying a similar approach grounded in query pairs as in performance bug finding. Among these proposals, Argus is most thematically similar to this work as it uses LLMs to generate pairs of semantically equivalent but syntactically different queries that they then execute and compare results [16]. Our work differs as we are searching for and analyzing query planner performance bugs, not correctness bugs.
Agentic performance debugging. Researchers have recently been exploring leveraging LLMs to help with performance debugging [31] and diagnostics [41]. Such techniques propose workflows involving multiple agents, grounded in artifacts (e.g., prior customer tickets, troubleshooting documents) [31] and equipped with tools [41], to propose remediations for a database performance problem [31] or diagnostics reports [41]. Our work differs as we leverage agents to search for queries that trigger query planning stalls, but we are not using the agents to propose fixes.
5 Conclusion
This paper showed that query planning is not always a low-cost operation. Using a lightweight agentic search, we found queries that take more than three minutes to plan on each of the seven DBMSes. Most slow-to-plan queries are DBMS-specific, possibly because they expose planner-specific implementation quirks. Nevertheless, our analysis showed that some query pathologies affect multiple DBMSes. Our findings have implications for planner implementers and downstream systems. Planner implementers should account for adversarial inputs and design their planners to have stable planning performance. Systems that invoke query planners or depend on physical query plans should not assume that planning is always inexpensive and should provide a fast fallback when planning exceeds a time budget. More broadly, we hope these findings encourage further study of query planning latency as a first-class performance and robustness concern.
References
[1] DuckDB Authors. 2026. WITH Clause. https://duckdb.org/docs/lts/sql/query_syntax/with.
[2] PostgreSQL Authors. 2026. Common Table Expression Materialization. https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-CTE-MATERIALIZATION.
[3] Jinsheng Ba and Manuel Rigger. 2023. Testing Database Engines via Query Plan Guidance. In The 45th International Conference on Software Engineering (ICSE'23).
[4] Jinsheng Ba and Manuel Rigger. 2024. CERT: Finding Performance Issues in Database Systems Through the Lens of Cardinality Estimation. In The 46th International Conference on Software Engineering (ICSE'24).
[5] Jinsheng Ba and Manuel Rigger. 2024. Keep It Simple: Testing Databases via Differential Query Plans. Proceeding of ACM Management of Data (SIGMOD'24) (June 2024).
[6] Philipp Fent, Guido Moerkotte, and Thomas Neumann. 2023. Asymptotically Better Query Optimization Using Indexed Algebra. Proc. VLDB Endow. 16, 11 (July 2023), 3018–3030. doi:10.14778/3611479.3611505
[7] Wook-Shin Han, Wooseong Kwak, Jinsoo Lee, Guy M. Lohman, and Volker Markl. 2008. Parallelizing Query Optimization. Proc. VLDB Endow. 1, 1 (Aug. 2008), 188–200. doi:10.14778/1453856.1453882
[8] Axel Hertzchuch, Claudio Hartmann, Dirk Habich, and Wolfgang Lehner. 2021. Simplicity Done Right for Join Ordering. In Proceedings of the 11th Annual Conference on Innovative Data Systems Research (CIDR '21).
[9] Benjamin Hilprecht and Carsten Binning. 2022. Zero-Shot Cost Models for Out-of-the-box Learned Cost Prediction. Proceedings of the VLDB Endowment 15, 11 (2022), 2361–2374. https://www.vldb.org/pvldb/vol15/p2361-hilprecht.pdf
[10] Ihab F. Ilyas, Jun Rao, Guy Lohman, Dengfeng Gao, and Eileen Lin. 2003. Estimating Compilation Time of a Query Optimizer. In Proceedings of the 2003 ACM SIGMOD International Conference on Management of Data (San Diego, California) (SIGMOD '03). Association for Computing Machinery, New York, NY, USA, 373–384. doi:10.1145/872757.872803
[11] Jinho Jung, Hong Hu, Joy Arulraj, Taesoo Kim, and Woonhak Kang. 2019. APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems. Proc. VLDB Endow. 13, 1 (Sept. 2019), 57–70. doi:10.14778/3357377.3357382
[12] Jinhui Lai, Chi Zhang, Jie Liang, Zihao Zeng, Zhiyong Wu, Jingzhou Fu, Chijin Zhou, Shuai Ma, Yu Jiang, and Zichen Xu. 2026. Finding Missed Optimizations in DBMSs through Unbalanced Short-circuit Query Construction. Proc. ACM Manag. Data 4, 3, Article 184 (May 2026), 24 pages. doi:10.1145/3802061
[13] Viktor Leis, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2015. How good are query optimizers, really? Proc. VLDB Endow. 9, 3 (Nov. 2015), 204–215. doi:10.14778/2850583.2850594
[14] Zhan Li, Olga Papaemmanouil, and Mitch Cherniack. 2016. OptMark: A Toolkit for Benchmarking Query Optimizers. In Proceedings of the 25th ACM International on Conference on Information and Knowledge Management (Indianapolis, Indiana, USA) (CIKM '16). Association for Computing Machinery, New York, NY, USA, 2155–2160. doi:10.1145/2983323.2983658
[15] Xinyu Liu, Qi Zhou, Joy Arulraj, and Alessandro Orso. 2022. Automatic detection of performance bugs in database systems using equivalent queries. In Proceedings of the 44th International Conference on Software Engineering (Pittsburgh, Pennsylvania) (ICSE '22). Association for Computing Machinery, New York, NY, USA, 225–236. doi:10.1145/3510003.3510093
[16] Qiuyang Mang, Runyuan He, Suyang Zhong, Xiaoxuan Liu, Huanchen Zhang, and Alvin Cheung. 2026. Automated Discovery of Test Oracles for Database Management Systems Using LLMs. Proc. ACM Manag. Data 4, 3, Article 140 (May 2026), 28 pages. doi:10.1145/3802017
[17] Ryan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul, Mohammad Alizadeh, and Tim Kraska. 2022. Bao: Making Learned Query Optimization Practical. In Proceedings of the International Conference on Management of Data (SIGMOD '22).
[18] Ryan Marcus, Parimarjan Negi, Hongzi Mao, Chi Zhang, Mohammad Alizadeh, Tim Kraska, Olga Papaemmanouil, and Nesime Tatbul. 2019. Neo: A Learned Query Optimizer. Proceedings of the VLDB Endowment 12, 11 (2019).
[19] Ryan Marcus and Olga Papaemmanouil. 2019. Plan-Structured Deep Neural Network Models for Query Performance Prediction. Proceedings of the VLDB Endowment 12, 11 (2019), 1733–1746. doi:10.14778/3342263.3342646
[20] Thomas Neumann. 2025. Improving Unnesting of Complex Queries. In Datenbanksysteme für Business, Technologie und Web (BTW 2025). Gesellschaft für Informatik, Bonn, 25–47. doi:10.18420/BTW2025-01
[21] Thomas Neumann and Bernhard Radke. 2018. Adaptive Optimization of Very Large Join Queries. In Proceedings of the 2018 International Conference on Management of Data (Houston, TX, USA) (SIGMOD '18). Association for Computing Machinery, New York, NY, USA, 677–692. doi:10.1145/3183713.3183733
[22] Oracle Corporation. 2026. MySQL common_subexpression_elimination.cc File Reference. https://dev.mysql.com/doc/dev/mysql-server/9.7.1/common_subexpression_elimination_8cc.html.
[23] Oracle Corporation. 2026. MySQL Reference Manual. https://dev.mysql.com/doc/refman/9.7/en/server-system-variables.html#sysvar_optimizer_search_depth.
[24] Oracle Corporation. 2026. MySQL SQL Planner Code. https://github.com/mysql/mysql-server/blob/06a5c1c99c377fc41b2eba1ea244e8b220bdc3c8/sql/sql_planner.cc#L2638-L2642.
[25] Anthony G Read. 2006. DeWitt Clauses: Can We Protect Purchasers Without Hurting Microsoft. Rev. Litig. 25 (2006), 387.
[26] Maximilian Rieger and Thomas Neumann. 2025. T3: Accurate and Fast Performance Prediction for Relational Database Systems With Compiled Decision Trees. Proc. ACM Manag. Data 3, 3, Article 227 (June 2025), 27 pages. doi:10.1145/3725364
[27] Manuel Rigger and Zhendong Su. 2020. Detecting Optimization Bugs in Database Engines via Non-Optimizing Reference Engine Construction. In Proceedings of the 2020 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Sacramento, California, United States) (ESEC/FSE 2020). doi:10.1145/3368089.3409710
[28] Manuel Rigger and Zhendong Su. 2020. Finding Bugs in Database Systems via Query Partitioning. Proc. ACM Program. Lang. 4, OOPSLA, Article 211 (2020). doi:10.1145/3428279
[29] Manuel Rigger and Zhendong Su. 2020. Testing Database Engines via Pivoted Query Synthesis. In 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI '20). USENIX Association, Banff, Alberta. https://www.usenix.org/conference/osdi20/presentation/rigger
[30] Gaurav Saxena, Mohammad Rahman, Naresh Chainani, Chunbin Lin, George Caragea, Fahim Chowdhury, Ryan Marcus, Tim Kraska, Ippokratis Pandis, and Balakrishnan (Murali) Narayanaswamy. 2023. Auto-WLM: Machine Learning Enhanced Workload Management in Amazon Redshift. In Companion of the 2023 International Conference on Management of Data (Seattle, WA, USA) (SIGMOD '23). Association for Computing Machinery, New York, NY, USA, 225–237. doi:10.1145/3555041.3589677
[31] Vikramank Singh, Kapil Eknath Vaidya, Vinayshekhar Bannihatti Kumar, Sopan Khosla, Balakrishnan Narayanaswamy, Rashmi Gangadharaiah, and Tim Kraska. 2024. Panda: Performance Debugging for Databases Using LLM Agents. In 14th Conference on Innovative Data Systems Research (CIDR '24). 6 pages. https://www.cidrdb.org/cidr2024/papers/p6-singh.pdf
[32] Ji Sun and Guoliang Li. 2019. An End-to-End Learning-based Cost Estimator. Proceedings of the VLDB Endowment 13, 3 (2019), 307–319. doi:10.14778/3368289.3368296
[33] Transaction Processing Performance Council. 2025. TPC-H Benchmark. https://www.tpc.org/TPC_Documents_Current_Versions/pdf/TPC-H_v3.0.1.pdf.
[34] Immanuel Trummer and Christoph Koch. 2016. Parallelizing Query Optimization on Shared-Nothing Architectures. Proc. VLDB Endow. 9, 9 (May 2016), 660–671. doi:10.14778/2947618.2947622
[35] Zhiyong Wu, Jie Liang, Jingzhou Fu, Mingzhe Wang, and Yu Jiang. 2025. Hulk: Exploring Data-Sensitive Performance Anomalies in DBMSs via Data-Driven Analysis. Proc. ACM Softw. Eng. 2, ISSTA, Article ISSTA096 (June 2025), 22 pages. doi:10.1145/3728973
[36] Zhiyong Wu, Jie Liang, Jingzhou Fu, Mingzhe Wang, and Yu Jiang. 2025. PUPPY: Finding Performance Degradation Bugs in DBMSs via Limited-Optimization Plan Construction. In Proceedings of the 47th IEEE/ACM International Conference on Software Engineering (ICSE '25). IEEE Computer Society, 679–690. doi:10.1109/ICSE55347.2025.00045
[37] Ziniu Wu, Ryan Marcus, Zhengchun Liu, Parimarjan Negi, Vikram Nathan, Pascal Pfeil, Gaurav Saxena, Mohammad Rahman, Balakrishnan Narayanaswamy, and Tim Kraska. 2024. Stage: Query Execution Time Prediction in Amazon Redshift. In Companion of the 2024 International Conference on Management of Data (Santiago AA, Chile) (SIGMOD '24). Association for Computing Machinery, New York, NY, USA, 280–294. doi:10.1145/3626246.3653391
[38] Ziniu Wu, Pei Yu, Peilun Yang, Rong Zhu, Yuxing Han, Yaliang Li, Defu Lian, Kai Zeng, and Jingren Zhou. 2022. A Unified Transferable Model for ML-Enhanced DBMS. In Proceedings of the 12th Conference on Innovative Data Systems Research (CIDR '22). https://www.cidrdb.org/cidr2022/papers/p6-wu.pdf
[39] Geoffrey X. Yu, Ryan Marcus, and Tim Kraska. 2026. Tailwind: A Practical Framework for Query Accelerators. arXiv:2604.28079 [cs.DB] https://arxiv.org/abs/2604.28079
[40] Chi Zhang and Manuel Rigger. 2025. Constant Optimization Driven Database System Testing. Proc. ACM Manag. Data 3, 1, Article 24 (Feb. 2025), 24 pages. doi:10.1145/3709674
[41] Xuanhe Zhou, Guoliang Li, Zhaoyan Sun, Zhiyuan Liu, Weize Chen, Jianming Wu, Jiesi Liu, Ruohang Feng, and Guoyang Zeng. 2024. D-Bot: Database Diagnosis System Using Large Language Models. Proceedings of the VLDB Endowment 17, 10 (2024), 2514–2527. https://www.vldb.org/pvldb/vol17/p2514-li.pdf