Configuring the 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 Adaptive Server recomputes the precomputed result set instead of performing an incremental maintenance).

Unless you specify otherwise, Adaptive Server does not use a stale precomputed result set to rewrite queries. Use the set materialized_view_optimization to specify at the session level whether Adaptive Server can use stale precomputed result sets when rewriting queries during optimization:

set materialized_view_optimization {disable | fresh | stale} 

For Adaptive Server to use stale precomputed result sets to rewrite queries:

See Reference Manual: Commands.