I-Rex: An Interactive Debugger for SQL

📅 2026-07-17
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the lack of interactive debugging tools for SQL, which hinders effective localization of logical errors. To bridge this gap, we propose I-Rex, the first lightweight interactive debugger that adapts general-purpose programming debugging paradigms—such as step-through execution, watchpoints, and arbitrary jump—to the SQL domain. Deployed as a non-intrusive middleware, I-Rex operates without modifying database state or requiring query preprocessing. It leverages selective materialization and query rewriting techniques to efficiently harness native database capabilities, enabling fine-grained visualization of query execution. Experimental evaluation and user studies demonstrate that I-Rex substantially improves both the efficiency of diagnosing SQL logic errors and overall user experience.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

SQL debugging
logical bugs
declarative language
interactive debugger
query inspection
Innovation

Methods, ideas, or system contributions that make the work stand out.

SQL debugging
interactive debugger
query rewriting
selective materialization
lightweight middleware
🔎 Similar Papers
No similar papers found.