01 July, 2015

Materialized Views : Refreshing a materialized view | Subtopic

  • refresh type and refresh interval can be specified while creating.
  • fast, complete, never or force
  • manual refresh >> use DBMS_MVIEW.REFRESH
    • EXECUTE DBMS_MVIEW.REFRESH('view_name','p')
    • c-complete; f- fast; p- fast using pct; ? - force


  •  DBMS_MVIEW.REFRESH_ALL_MVIEWS; refresh all mviews one by one.

  • ALTER MATERIALIZED VIEW mviewname; 
  • DROP MATERIALIZED VIEW mviewname;



Materialized View Log

table which records the changes in the master table and also the replication history of the mview.
Can be used by any mview on the base table for which log table is created.
Used during mview refreshed as it records the changes of the master table and so can easily be used to update the mview with the new updates of the master table.