We investigate trade-offs in static and dynamic evaluation of hierarchical queries with arbitrary free variables. In the static setting, the trade-off is between the time to partially compute the query result and the delay needed to enumerate its tuples. In the dynamic setting, we additionally consider the time needed to update the query result under single-tuple inserts or deletes to the database. Our approach observes the degree of values in the database and uses different computation and maintenance strategies for high-degree (heavy) and low-degree (light) values. For the latter it partially computes the result, while for the former it computes enough information to allow for on-the-fly enumeration. We define the preprocessing time, the update time, and the enumeration delay as functions of the light/heavy threshold. By appropriately choosing this threshold, our approach recovers a number of prior results when restricted to hierarchical queries. We show that for a restricted class of hierarchical queries, our approach achieves worst-case optimal update time and enumeration delay conditioned on the Online Matrix-Vector Multiplication Conjecture.
翻译:我们用任意自由变量对等级查询进行静态和动态评估,调查在静态和动态评估等级查询中的权衡取舍。在静态设置中,权衡取舍时间是部分计算查询结果的时间与列出其图例所需的延迟时间之间的间隔。在动态设置中,我们进一步考虑在数据库插入或删除单项图题下更新查询结果所需的时间。我们的方法是观察数据库中的数值程度,对高度(重)和低度(轻度)值使用不同的计算和维护策略。对于后者,我们的方法是部分计算结果,而对于前者则计算足够的信息,以便进行飞行点点数。我们把预处理时间、更新时间和点点数延迟定义为光/重度阈值的函数。通过适当选择这一阈值,我们的方法在受等级查询限制时会恢复一些先前的结果。我们显示,对于有限的等级查询类别,我们的方法是取得最差的最佳更新时间和点数延迟,条件是以在线矩阵变量乘数截点为条件。</s>