Reputation: 1
Is it possible to select and view the existing data from materialized view while a complete refresh happens?
Upvotes: 0
Views: 1040
Reputation: 231661
That depends on whether the refresh is atomic or not.
In an atomic refresh, Oracle behind the scenes will delete the existing data and re-insert the results. That takes longer but queries that start before the refresh finishes will see the old data. In a non-atomic refresh, Oracle behind the scenes will truncate the existing data and re-insert. That makes for a faster refresh but it means that the materialized view will be empty during the refresh.
If you are using dbms_mview.refresh, atomic is the default refresh method.
Upvotes: 2