If insufficient temporary space is available to rebuild the indexes, then you must explicitly drop each index or mark it About Types of Refresh for Materialized Views The refresh method can be incremental or a complete refresh.
There are two incremental refresh methods, known as log-based refresh and partition change tracking (PCT) refresh. Users can perform a complete refresh at any time after the materialized view is created.
Therefore, if you defer refreshing your materialized views, you can either rely on your chosen rewrite integrity level to determine whether or not a stale materialized view can be used for query rewrite, or you can temporarily disable query rewrite with an .
Refreshing a materialized view automatically updates all of its indexes.
In the case of full refresh, this requires temporary sort space to rebuild all indexes during refresh.
This is because the full refresh truncates or deletes the table before inserting the new full data volume.
For materialized views that use the log-based fast refresh method, a materialized view log and/or a direct loader log keep a record of changes to the base tables.
A materialized view log is a schema object that records changes to a base table so that a materialized view defined on the base table can be refreshed incrementally.
, a complete refresh must be requested before it can be used for the first time.Each materialized view log is associated with a single base table.The materialized view log resides in the same database and schema as its base table.This chapter discusses how to refresh materialized views, which is a key element in maintaining good performance and consistent data when working with materialized views in a data warehousing environment.This chapter includes the following sections: The database maintains data in materialized views by refreshing them after changes to the base tables.Both in-place refresh and out-of-place refresh achieve good performance in certain refresh scenarios.However, the out-of-place refresh enables high materialized view availability during refresh, especially when refresh statements take a long time to finish.The refresh approach enables you to keep a set of tables and the materialized views defined on them to be always in sync.In this refresh method, the user does not directly modify the contents of the base tables but must use the APIs provided by the synchronous refresh package that will apply these changes to the base tables and materialized views at the same time to ensure their consistency.The PCT refresh removes all data in the affected materialized view partitions or affected portions of data and recomputes them from scratch. If you anticipate performing insert, update or delete operations on tables referenced by a materialized view concurrently with the refresh of that materialized view, and that materialized view includes joins and aggregation, Oracle recommends you use , the materialized view is changed every time a transaction commits, thus ensuring that the materialized view always contains the latest data.Alternatively, you can control the time when refresh of the materialized views occurs by specifying For each of these refresh options, you have two techniques for how the refresh is performed, namely in-place refresh and out-of-place refresh.