🤖 AI Summary
PostgreSQL’s query optimizer decision-making process is opaque, hindering both pedagogical understanding and production-level query tuning. To address this, we present the first interactive, web-based visualization tool—built with D3.js and React—that supports end-to-end, log-driven analysis of both the dynamic programming (DP) and genetic algorithm (GEQO) optimizers. By parsing native PostgreSQL optimizer logs, our tool visualizes critical decisions—including access path selection and join order enumeration—as topology graphs, decision trees, and animated execution paths. It is the first to enable *comparable*, *interpretable*, and *debuggable* inspection of both optimization strategies. Empirical evaluation demonstrates significant improvements in database teaching effectiveness and practitioner query tuning proficiency. The open-source implementation has been officially adopted by the PostgreSQL community, establishing a new paradigm for optimizer strategy analysis, validation, and refinement.
📝 Abstract
In the world of relational database management, the query optimizer is a critical component that significantly impacts query performance. To address the challenge of optimizing query performance due to the complexity of optimizers -- especially with join operations -- we introduce Jovis. This novel visualization tool provides a window into the often intricate process of query optimization in PostgreSQL, making it more accessible and understandable. PostgreSQL employs two different query optimization strategies: the Dynamic Programming (DP) Optimizer for most scenarios and the Genetic Query Optimizer (GEQO) for more complex queries with numerous joins, both of which are supported in Jovis. Our tool visualizes the optimizer's decision-making process, from evaluating access paths for each relation to determining join orderings, all using data derived from the optimizer's logs. Jovis not only clarifies the query optimization process through visualizations but also serves as an invaluable learning tool for learners and a practical resource for experienced database professionals looking to optimize their query performance or even the query optimizer itself. The source code has been made available at https://github.com/snu-jovis.