A SQL Debugger Built from Spare Parts — Turning a SQL:1999 Database System into Its Own Debugger.
Benjamin Dietrich • Torsten Grust
Proceedings of the 34th ACM SIGMOD Int’l Conference on the Management of Data (SIGMOD 2015), Melbourne, Australia, June 2015.
We demonstrate a new incarnation of Habitat, an observational debugger for SQL. In observational debugging, users highlight parts of a—presumably faulty—query to observe the evaluation of SQL subexpressions and learn about the query’s actual runtime behavior. The present version of Habitat has been redesigned from scratch and employs a query instrumentation technique that exclusively relies on the SQL facilities of the underlying RDBMS. We particularly shed light on new features like (1) the debugging of recursive SQL queries and (2) the observation of row groups (before and after aggregation). Habitat can turn any reasonably modern SQL:1999 RDBMS into its own language-level SQL debugger.