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.
翻译:在关系数据库管理领域,查询优化器是显著影响查询性能的关键组件。针对优化器复杂性(尤其是涉及连接操作时)带来的查询性能优化挑战,我们提出了Jovis。这一创新的可视化工具为PostgreSQL中通常错综复杂的查询优化过程提供了一个观察窗口,使其更易于理解和使用。PostgreSQL采用两种不同的查询优化策略:适用于大多数场景的动态规划(DP)优化器,以及适用于包含大量连接的复杂查询的遗传查询优化器(GEQO),Jovis同时支持这两种策略。我们的工具利用优化器日志数据,将优化器的决策过程可视化——从评估每个关系的访问路径到确定连接顺序。Jovis不仅通过可视化阐明了查询优化过程,还成为了学习者宝贵的学习工具,并为经验丰富的数据库专业人员提供了实用资源,帮助他们优化查询性能乃至查询优化器本身。源代码已发布于 https://github.com/snu-jovis。