Handling Materialized Views 149
To avoid irrelevant views, if the resulting ρ(V, T
) contains Cartesian prod-
ucts we consider the reduction invalid and stop (a cartesian product does not
provide any efficiency advantage and it is almost always much larger than the
input relations).
The following example illustrates the reduction operator:
V = SELECT R.c, S.c ρ(V, {R}) = SELECT R.c, R.b, R.x
FROM R, S FROM R
WHERE R.x = S.y AND WHERE 10 < R.a < 50
10 < R.a < 50 AND GROUP BY R.c, R.b, R.x
20 < S.a < 30 AND
R.b + S.b < 10
GROUP BY R.c, S.c
8.2.4 Indexes over Materialized Views
So far we have discussed the merging and reduction operations applied to
materialized views without paying attention to indexes over those materialized
views. In reality, each materialized ...