Off-the-shelf RDBMS typically expose only the query execution plan (QEP) of an SQL query, without presenting information about representative alternative query plans (AQPs) considered during plan selection in a user-friendly manner. Providing easy access to representative AQPs is valuable in database education, as it helps learners understand the plan choices made by a query optimizer, one of the several important components related to relational query processing. In this paper, we present a novel problem called the informative plan selection problem (TIPS), which aims to discover a set of k informative AQPs from the underlying plan space so that the plan informativeness of the set is maximized. Specifically, we explore two variants of the problem, batch TIPS and incremental TIPS, to cater to diverse learners. Due to the computational hardness of the problem, we present an approximation algorithm to address it efficiently while providing theoretical guarantees for the results. An extensive experimental study, including feedback from real-world learners and a three-year in-class evaluation of academic outcomes, demonstrates the effectiveness of our solutions for database education.
翻译:现成的关系数据库管理系统通常仅展示SQL查询的执行计划,而未能以用户友好的方式呈现计划选择过程中考虑的代表性备选查询计划。在数据库教育中,便捷获取代表性备选查询计划具有重要价值,因为它有助于学习者理解查询优化器(关系查询处理相关的重要组件之一)所作的计划选择。本文提出一个称为信息化计划选择问题的新问题,其目标是从底层计划空间中发现一组k个信息化备选查询计划,以最大化该集合的计划信息量。具体而言,我们探索了该问题的两个变体——批量信息化计划选择与增量信息化计划选择,以适应不同学习者的需求。鉴于该问题的计算复杂性,我们提出一种近似算法以高效求解,同时为结果提供理论保证。一项包含真实学习者反馈及为期三年课堂学术成果评估的广泛实验研究,证明了我们提出的解决方案在数据库教育中的有效性。