We study two classes of summary-based cardinality estimators that use statistics about input relations and small-size joins in the context of graph database management systems: (i) optimistic estimators that make uniformity and conditional independence assumptions; and (ii) the recent pessimistic estimators that use information theoretic linear programs. We begin by addressing the problem of how to make accurate estimates for optimistic estimators. We model these estimators as picking bottom-to-top paths in a cardinality estimation graph (CEG), which contains sub-queries as nodes and weighted edges between sub-queries that represent average degrees. We outline a space of heuristics to make an optimistic estimate in this framework and show that effective heuristics depend on the structure of the input queries. We observe that on acyclic queries and queries with small-size cycles, using the maximum-weight path is an effective technique to address the well known underestimation problem for optimistic estimators. We show that on a large suite of datasets and workloads, the accuracy of such estimates is up to three orders of magnitude more accurate in mean q-error than some prior heuristics that have been proposed in prior work. In contrast, we show that on queries with larger cycles these estimators tend to overestimate, which can partially be addressed by using minimum weight paths and more effectively by using an alternative CEG. We then show that CEGs can also model the recent pessimistic estimators. This surprising result allows us to connect two disparate lines of work on optimistic and pessimistic estimators, adopt an optimization from pessimistic estimators to optimistic ones, and provide insights into the pessimistic estimators, such as showing that there are alternative combinatorial solutions to the linear programs that define them.
翻译:我们研究两种基于即时的直观基本估计值,在图形数据库管理系统中使用关于投入关系和小尺寸结合的统计数据:(一) 乐观的估算值,得出统一和有条件的独立假设;和(二) 最近使用信息理论线性程序的悲观估计器。我们首先研究如何为乐观估算器作出准确估计的问题。我们模拟这些估算值,在基数估计图(CEG)中选取从下到顶的路径,该图含有作为节点的子查询器和代表平均度的子查询器之间的加权边际。我们勾画出一个可以在这个框架中做出乐观估计的偏差空间,并显示有效的偏差取决于输入查询的结构。我们观察到,通过使用最大重量路径,这些测量器可以有效地解决已知的模型偏差问题,作为乐观估计器。我们显示,在大型的替代数据集和工作量之间,将这种直径直线的精确度空间连接到最近的直径直线,在之前的直径直径轨道上,我们用这些直径直的直径直的直径直到直径直的直的直径直径直径直到直的轨道,在之前的直径直径直径直径直的轨道上可以显示,在前的直径直的轨道上,通过前的直径直的偏向直的直的直的直的轨道上显示,从前的直的直向直向直到直的轨道可以显示,在前的直向直向直径直到直的轨道上,通过直向的直到直到直向直径径直到直的路径,可以显示。