Materialized views have been found to be very effective at speeding up quer
ies, and are increasingly being supported by commercial databases and data
warehouse systems. However, whereas the amount of data entering a warehouse
and the number of materialized views are rapidly increasing, the time wind
ow available for maintaining materialized views is shrinking. These trends
necessitate efficient techniques for the maintenance of materialized views.
In this paper, we show how to find an efficient plan for the maintenance of
a set of materialized views, by exploiting common subexpressions between d
ifferent view maintenance expressions; In particular, we show how to effici
ently select (a) expressions and indices that can be effectively shared, by
transient materialization; fb) additional expressions and indices for perm
anent materialization; and (c) the best maintenance plan - incremental or r
ecomputation - for each view. These three decisions are highly interdepende
nt, and the choice of one affects the choice of the others. We develop a fr
amework that cleanly integrates the various choices in a systematic and eff
icient manner. Our evaluations show that many-fold improvement in view main
tenance time can be achieved using our techniques. Our algorithms can also
be used to efficiently select materialized views to speed up workloads cont
aining queries and updates.