上翻(Rollup)作为OLAP的核心操作,将多维数据按维层次聚集,使用户能够在不同粒度上对数据进行观察。尽管基于常规层次的上翻操作,可被数据仓库高效地处理。然而,对于递归层次而言,由于SQL递归对于聚集函数分层的限制.如果将上翻操作表示为SQL递归查询,则会导致效率低下。为解决这一效率问题,文中专门针对OLAP的特点。提出了一个基于迭代的上翻操作计算策略,并利用对象关系技术,将这一策略无缝地嵌入到数据仓库之中。实验表明,其效率远远高于SQL递归计算策略。
Rollup, a key operation in OLAP queries, is to aggregate multidimensional data on dimensional hierarchies. While the operation can be efficiently implemented on regular hierarchies in data warehouse, its application to reeursive hierarchies proved to be problematic. Due to the stratification restriction, representing rollup operation on recursive hierarchy as SQL recursive query will cause considerable overhead and is thus inefficient. To avoid this inefficient problem, this paper proposes an iteration-based evaluation strategy. In our solution, aggregation on recursive hierarchy is modeled as a binary operator tree which is stored in its postfix notation and executed by a push down stack. We also demonstrate how to seamlessly embed this novel strategy into data warehouse that is based on ORDBMS. Experiment shows that our proposed solution is quite efficient compared with the SQL recursive evaluation strategy.