Skip to main content

I-Rex: An Interactive Debugger for SQL

Preprints
Hu, Y; Chen, Z; Leong, Z; Sokhi, S; Zheng, Z; Chao, A; Stephens-Martinez, K; Roy, S; Yang, J
July 17, 2026

SQL is declarative in nature and rich in its features. Writing semantically correct SQL queries and finding logical bugs in SQL are not easy, even for experienced programmers, who are often used to the mindset of working with general-purpose programming languages (GPLs). While there are many GPL debuggers, SQL debugging has received much less attention. In this paper, we present I-Rex, a SQL debugger that enables users to inspect the logical execution of SQL queries visually and interactively to identify and potentially fix logical bugs in the queries. I-Rex draws analogies to the debugging paradigm of GPLs (e.g., stepping, watchpoints, etc.), making it easier for programmers to adopt. However, unlike debugging GPLs, which involves executing the underlying program in full to the point of interest, I-Rex allows users to jump to arbitrary points of interest by leveraging the power of the database systems, through selective materialization and query rewrites. To simplify deployment, I-Rex acts as a lightweight middleware on top of the database system; it imposes no overhead to prepare a database for debugging and maintains no state in the database systems during debugging sessions. We demonstrate the effectiveness of I-Rex through performance experiments as well as a user study in an educational setting.

Duke Scholars

Altmetric Attention Stats
Dimensions Citation Stats

Publication Date

July 17, 2026
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Hu, Y., Chen, Z., Leong, Z., Sokhi, S., Zheng, Z., Chao, A., … Yang, J. (2026). I-Rex: An Interactive Debugger for SQL.
Hu, Yihao, Zian Chen, Zhiming Leong, Sharan Sokhi, Zachary Zheng, Alex Chao, Kristin Stephens-Martinez, Sudeepa Roy, and Jun Yang. “I-Rex: An Interactive Debugger for SQL,” July 17, 2026.
Hu Y, Chen Z, Leong Z, Sokhi S, Zheng Z, Chao A, et al. I-Rex: An Interactive Debugger for SQL. 2026.
Hu, Yihao, et al. I-Rex: An Interactive Debugger for SQL. 17 July 2026.
Hu Y, Chen Z, Leong Z, Sokhi S, Zheng Z, Chao A, Stephens-Martinez K, Roy S, Yang J. I-Rex: An Interactive Debugger for SQL. 2026.

Publication Date

July 17, 2026