cell 级别的部分物化的数据立方体
PMC: Select Materialized Cells in Data Cubes
-
摘要: 对数据的稳定而快速的存取是联机分析处理的基本特征,也是对数据立方体的基本要求。在数据仓库中,预聚集(或称物化)是提高数据查询速度的主要手段。预聚集所带来的问题是对存储空间需求的(急剧)增大和数据更新效率的大幅降低。因此目前采用的策略通常是只对其中一部分数据进行预聚集,也就是部分物化。 目前常见的部分物化算法都是在视图级别上上实现的,所以对数据的选择也是在视图层次上的。也就是说,在 Data Cube 中某个视图的所有数据要么全部为物化,要么全部不被物化。这样的物化方式所产生的一个后果就是物化视图中的数据与非物化视图中数据在查询性能上差别很大。此外,视图级别的物化还需要对用户的查询模式的先验知识,而这类知识往往是我们所不具备的。 QC-Tree 是近两年提出的一种数据立方体的高效存储结构。它在极大限度地压缩了数据所占用的存储空间的同时,保持了良好的更新和查询性能。 QC-Tree是一种全物化的数据立方体的存储结构,这意味着也可以使用部分物化的方法进一步改善它的存储和维护性能。 本文提出了一种在 QC-Tree 中实现 cell 级别的部分物化的结构: PMC。 PMC主要利用了QC-Tree所保持的数据间的语义的卷钻关系。 我们注意到, 对于 QC-Tree 中任何一个节点 N 来说, 它的维标号相同的孩子节点的值的聚集值都相同,而且恰好等于节点 N 的值。换句话说,节点 N 的值可以通过对它的孩子节点的值进行聚集而得到。如果,获取节点 N 的某个维的所有孩子节点的值的代价很小的话,就没有必要存储节点 N 的值。在对节点 N 进行查询时,只需要获得节点 N 的一个组中的所有孩子节点的值,临时将节点 N 的值计算出来回答查询即可。我们称这种没有存储聚集值的节点为非物化节点,称这种使用了非物化节点的结构为 PMC。实际上,QC-Tree可以认为是PMC的一种特殊情况。 我们提出了 PMC中相应的物化节点选择、查询以及维护算法。在进行物化节点选择时,可以通过阈值,将所有节点的查询代价控制在一个给定范围内,从而确保物化数据和非物化数据在查询性能上的均衡。 PMC 的部分物化不同于已被广泛研究的视图级别的部分物化。就我们所知, PMC 是第一种在 cell 级别进行数据的选择和物化的结构。由于使用了部分物化, PMC 能够进一步减少 QC-Tree 所占用的存储空间并拥有更少的更新代价。此外, PMC 还能保证数据立方体中所有数据在查询性能上的均衡性,这是传统的视图级别的部分物化所无法做到的。Abstract: QC-Tree is one of the most storage-efficient structures for data cubes in an MOLAP system. Although QC-Tree can achieve a high compression ratio, it is still a fully materialized data cube. In this paper, an improved structure PMC is presented allowing us to materialize only a part of the cells in a QC-Tree to save more storage space. There is a notable difference between our partially materialization algorithm and traditional materialized views selection algorithms. In a traditional algorithm, when a view is selected, all the cells in this view are to be materialized. Otherwise, if a view is not selected, all the cells in this view will not be materialized. This strategy results in the unstable query performance. The presented algorithm, however, selects and materializes data in cell level, and, along with further reduced space and update cost, it can ensure a stable query performance. A series of experiments are conducted on both synthetic and real data sets. The results show that PMC can further reduce storage space occupied by the data cube, and canshorten the time to update the cube.