Lazy Maintenance of Materialized Views

Materialized views can speed up query processing greatly but they have to be kept up to date to be useful. Today, database systems typically maintain views eagerly in the same transaction as the base table updates. This has the effect that updates pay for view maintenance while beneficiaries (queries) get a free ride! View maintenance overhead can be significant and it seems unfair to have updates bear the cost. We present a novel way to lazily maintain materialized views that relieves updates of this overhead. Maintenance of a view is postponed until the system has free cycles or the view is referenced by a query. View maintenance is fully or partly hidden from queries depending on the system load. Ideally, views are maintained entirely on system time at no cost to updates and queries. The efficiency of lazy maintenance is improved by combining updates from several transactions into a single maintenance operation, by condensing multiple updates of the same row into a single update, and by exploiting row versioning. Experiments using a prototype implementation in Microsoft SQL Server show much faster response times for updates and also significant reduction in maintenance cost when combining updates.

[1]  Hamid Pirahesh,et al.  Answering complex SQL queries using automatic summary tables , 2000, SIGMOD '00.

[2]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.

[3]  V. S. Subrahmanian,et al.  Maintaining views incrementally , 1993, SIGMOD Conference.

[4]  Leonid Libkin,et al.  Incremental maintenance of views with duplicates , 1995, SIGMOD '95.

[5]  Inderpal Singh Mumick,et al.  Maintenance of data cubes and summary tables in a warehouse , 1997, SIGMOD '97.

[6]  Elke A. Rundensteiner,et al.  GPIVOT: efficient incremental maintenance of complex ROLAP views , 2005, 21st International Conference on Data Engineering (ICDE'05).

[7]  Jennifer Widom,et al.  On-line warehouse view maintenance , 1997, SIGMOD '97.

[8]  Jonathan Goldstein,et al.  Optimizing queries using materialized views: a practical, scalable solution , 2001, SIGMOD '01.

[9]  Stefano Stefani,et al.  Query processing for SQL updates , 2004, SIGMOD '04.

[10]  Frank Wm. Tompa,et al.  Efficiently updating materialized views , 1986, SIGMOD '86.

[11]  Mohamed Ziauddin,et al.  Materialized Views in Oracle , 1998, VLDB.

[12]  Hamid Pirahesh,et al.  Maintenance of Automatic Summary Tables. , 2000, SIGMOD 2000.

[13]  Jingren Zhou,et al.  Efficient Maintenance of Materialized Outer-Join Views , 2007, 2007 IEEE 23rd International Conference on Data Engineering.

[14]  Jennifer Widom,et al.  View maintenance in a warehousing environment , 1995, SIGMOD '95.

[15]  Ambuj K. Singh,et al.  Efficient view maintenance at data warehouses , 1997, SIGMOD '97.

[16]  Bruce G. Lindsay,et al.  How to roll a join: asynchronous incremental view maintenance , 2000, SIGMOD '00.

[17]  Latha S. Colby,et al.  Algorithms for deferred view maintenance , 1996, SIGMOD '96.

[18]  Yue Zhuge,et al.  The Strobe algorithms for multi-source warehouse consistency , 1996, Fourth International Conference on Parallel and Distributed Information Systems.

[19]  Wolfgang Lehner,et al.  Efficient exploitation of similar subexpressions for query processing , 2007, SIGMOD '07.

[20]  Hamid Pirahesh,et al.  Maintenance of cube automatic summary tables , 2000, SIGMOD 2000.