• 论文 •    

视图增量计算的延迟部分补偿算法

邹先霞,潘久辉,贾维嘉,   

  1. 1.中南大学 信息科学与工程学院,湖南长沙410083;2.暨南大学 计算机系,广东广州510632;3.香港城市大学 计算机系,香港九龙
  • 出版日期:2011-05-15 发布日期:2011-05-25

Deferred partial compensation algorithm for view increment computing

ZOU Xian-xia, PAN Jiu-hui, JIA Wei-jia,   

  1. 1.School of Information Science and Engineering, Central South University, Changsha 410083, China;2.Department of Computer Science, Jinan University, Guangzhou 510632, China;3.Department of Computer Science, City University of Hong Kong, Kow loon, Hong Kong SAR, China
  • Online:2011-05-15 Published:2011-05-25

摘要: 为解决异步传播算法中视图增量计算时间过长、占用系统资源过多及某些错误补偿问题,提出了在数据源上进行延迟部分补偿的算法。该算法要求获取数据源的基表增量时记下增量的事务时间,在实化视图层记录已用于视图增量计算的基表增量的最大事务提交时间。当计算实化视图新的增量时,比较同一个数据源在实化视图层上的记录时间与增量子查询的执行时间,如果这段时间基表产生新的增量,则进行补偿查询。补偿过程采用单个数据源上的时间进行比较,避免了全局时间问题,也解决了现有部分补偿算法可能产生的错误。该算法利用基表之间的主外码约束来减少计算次数,提高计算效率。分析和实验表明,该算法在计算效率和正确性方面都有所提高。

关键词: 实化视图, 异步传播, 增量计算, 部分补偿, 数据仓库, 算法

Abstract: The asynchronous propagation algorithms for view increment computing took quite a long time and consumed a lot of computers system resources, and the result of the partial compensation might be even wrong sometimes. To solve these problems of compensation algorithms, a deferred partial compensation algorithm in data sources was proposed. In this algorithm, the transaction commit timestamp of table changes was kept in data sources, and the latest transaction commit timestamp which was computed for view change was stored. If the table changed between the timestamp which maintained sub-query and the latest transaction commit timestamp, compensation query had to be enforced. Because compensation process referred to the time of single information source, this algorithm avoided the problems of global time and possible errors. Additionally, this algorithm took advantage of the primary and foreign keys to reduce computational cost. Experimental results showed that the proposed algorithm exhibited improvements over the traditional ones.

Key words: materialized view, asynchronous propagation, increment computing, partial compensation, data warehouses, algorithms

中图分类号: