A query optimizer produces a preferred execution plan by utilizing
statistics on views. These provide the optimizer with statistical
information beyond that available on tables, for example, with
information on the result of scalar or relational expressions.
Pre-derived accurate statistics are thus available which are used to
improve the accuracy of estimation and thus increase the quality and
reliability of the query processor. Transformations of expressions and
sub-expressions of candidate plans produce equivalent sub-expressions.
Where those sub-expressions include references to views, an estimation of
the cardinality and other execution statistics for the sub-expression can
be made using the view statistics. This can be used to estimate the
cardinality for all equivalent sub-expressions, leading to higher
accuracy for the estimate.