A precomputed result set is a view for which the result is computed, stored, and available for future use. Once configured for precomputed result sets, SAP ASE precomputes queries and attempts to use the precomputed result during subsequent iterations. Precomputed result sets are also called materialized views.
Conceptually, a precomputed result set is both a view (because it includes query definition stored in the system tables) and a table (because it includes persistent data). You can perform many of the same operations that you perform on tables on precomputed result sets, including creating indexes and running update statistics.
Once SAP ASE is configured to use precomputed result sets, the optimizer attempts to automatically rewrite each query using a precomputed result set. However, the final plan the optimizer selects is primarily cost based.
c1=c2 and c2=c3 and c3=c4
c1=c2 and c3=c4
the rewritten query using the precomputed result set must have a compensation predicate similar to c1=c3 to form an equivalent query.
Like an index, a precomputed result set has a maintenance cost for concurrent insert, update, and delete statements. Generally, precomputed result-set maintenance overhead consists of more than maintaining the indexes when the definition involves multiple table joins. Consequently, precomputed result sets are unsuitable for OLTP with heavy concurrent insert, update, and delete statements and simple index-based select statements.