A transformation-based optimizer generates rewritings by applying local
algebraic transformation rules on subexpressions of a query. Application
of a transformation rule produces substitute expressions, logically
equivalent to the original expression. View matching, that is, computing
a subexpression from materialized views, is one such transformation rule.
The view matching rule applies a view matching technique that determines
whether the original query can be computed from one or more of the
existing materialized views and, if so, generates substitute expressions.
An index structure of materialized views is provided that quickly narrows
the search to a set of candidate views on which the view matching
techniques can be applied. The index structure, also called a filter
tree, speeds up the search for applicable materialized views.