Finding Missed Optimizations in DBMSs through Unbalanced Short-circuit Query Construction

DBMSs underpin modern data-intensive applications, where performance directly impacts system responsiveness and user experience. To improve efficiency, DBMSs employ many sophisticated optimization techniques for SQL queries. However, the complexity of SQL queries and DBMS architectures often causes implementations to miss potential optimization opportunities, resulting in performance degradation, inefficient resource utilization, and diminished user experience. Identifying these missed optimizations is challenging due to the intricate interactions among query semantics, optimizer decisions, and execution behaviors. Existing approaches have detected many performance issues when implemented optimizations perform poorly. However, they rarely reveal optimizations that were entirely missed, leaving many performance gaps unaddressed. In this paper, we present SCor, a black-box approach for identifying missed optimizations in DBMSs through unbalanced short-circuit query construction. Our key insight is that the results of many queries can be determined without full execution, yet DBMSs still execute the entire query, revealing missed optimizations. SCor realizes it by constructing short-circuit queries, where the result can be obtained from low-cost operations alone. If the DBMS still executes the full query with high-cost operations, it indicates missed optimizations. Since short-circuit patterns are prevalent in SQL queries and can be flexibly embedded into diverse query structures, SCor can be systematically applied to expose missed optimizations across a wide range of queries. Our evaluation of SCor across 11 widely-used DBMSs, revealed 153 previously undetected performance bugs resulting from missed optimizations, including 2 bugs in Oracle and 3 bugs in PostgreSQL. Among all reported bugs, 125 have been confirmed by developers, and 33 have already been fixed.

Authors

Institutions

Publication Details

Journal
Proceedings of the ACM on Management of Data
Published
2026-05-18
DOI
https://doi.org/10.1145/3802061
Primary Topic
Advanced Database Systems and Queries
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Finding Missed Optimizations in DBMSs through Unbalanced Short-circuit Query Construction

Chijin Zhou, J Q Lai, Jingzhou Fu, Shuai Ma et al.
Proceedings of the ACM on Management of Data
Advanced Database Systems and Queries
article

Finding Missed Optimizations in DBMSs through Unbalanced Short-circuit Query Construction

Chijin Zhou, J Q Lai, Jingzhou Fu, Shuai Ma, Zichen Xu, Jie Liang, Yu Jiang, Chi Zhang, Zihao Zeng, Zhiyong Wu
article en

Abstract

DBMSs underpin modern data-intensive applications, where performance directly impacts system responsiveness and user experience. To improve efficiency, DBMSs employ many sophisticated optimization techniques for SQL queries. However, the complexity of SQL queries and DBMS architectures often causes implementations to miss potential optimization opportunities, resulting in performance degradation, inefficient resource utilization, and diminished user experience. Identifying these missed optimizations is challenging due to the intricate interactions among query semantics, optimizer decisions, and execution behaviors. Existing approaches have detected many performance issues when implemented optimizations perform poorly. However, they rarely reveal optimizations that were entirely missed, leaving many performance gaps unaddressed. In this paper, we present SCor, a black-box approach for identifying missed optimizations in DBMSs through unbalanced short-circuit query construction. Our key insight is that the results of many queries can be determined without full execution, yet DBMSs still execute the entire query, revealing missed optimizations. SCor realizes it by constructing short-circuit queries, where the result can be obtained from low-cost operations alone. If the DBMS still executes the full query with high-cost operations, it indicates missed optimizations. Since short-circuit patterns are prevalent in SQL queries and can be flexibly embedded into diverse query structures, SCor can be systematically applied to expose missed optimizations across a wide range of queries. Our evaluation of SCor across 11 widely-used DBMSs, revealed 153 previously undetected performance bugs resulting from missed optimizations, including 2 bugs in Oracle and 3 bugs in PostgreSQL. Among all reported bugs, 125 have been confirmed by developers, and 33 have already been fixed.

Proceedings of the ACM on Management of DataVol. 4(3)
Nanchang University (CN), East China Normal University (CN), Beihang University (CN), Tsinghua University (CN)
National Natural Science Foundation of China
Openalex Percentile: Top 4%
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.