Materialized Views: BUILD Options
Materialized Views: BUILD Options
A materialized view is a table segment whose contents are periodically refreshed based on a
query, either against a local or remote table.
Data can be summarized, pre computed and distributed in the form of Materialized views.
BUILD Options
The BUILD clause options are shown below.
• FAST: A fast refresh is attempted. If materialized view logs are not present against the
source tables in advance, the creation fails.
• COMPLETE: The table segment supporting the materialized view is truncated and
repopulated completely using the associated query.
• FORCE: A fast refresh is attempted. If one is not possible a complete refresh is
performed.
•
A refresh can be triggered in one of two ways.
EXEC DBMS_MVIEW.REFRESH('SALES_D_MV');
Materialized Views with REFRESH FAST
Based on the availability of materialized view logs, an incremental refresh happens.
• Fast refreshable materialized views can be created based on master tables and master
materialized views only.
• Materialized views are not eligible for fast refresh if the defined subquery contains an
analytic function.
If you do not have a primary key on the table, then you can go with the ROWID option.