Configuring Staleness

Precomputed result sets rely on updates from their base tables to ensure data is current.

When a precomputed result set is configured for immediate updates, any base table updates also update the precomputed result set. This update occurs as an incremental maintenance using changes to the base tables. However, if a precomputed result set is configured for manual updates, data may become stale because updates only occur when you run the refresh command (during which SAP ASE recomputes the precomputed result set instead of performing an incremental maintenance).

Unless you specify otherwise, SAP ASE does not use a stale precomputed result set to rewrite queries.

Use the set materialized_view_optimization to specify at the session level whether SAP ASE can use stale precomputed result sets when rewriting queries during optimization:
 set materialized_view_optimization {disable | fresh | stale} 
Next
For SAP ASE to use stale precomputed result sets to rewrite queries:

See Reference Manual: Commands.