-
Confusion on Metalink about Materialized View Logic
From Metalink :
When an mview refresh operation takes place, the following happens:
1. SYS.SNAP$ and SYS.MLOG$ are updated to show the time of refresh.
2. If a complete refresh on only one mview is performed using the DBMS_MVIEW.REFRESH() api, the mview base table is truncated. If the refresh is fast, or involves multiple mviews, or is being performed on a refresh group, rows in the mview base table(s) are deleted.
3. All rows selected from the master table are inserted into the snapshot base table.
4. SYS.SLOG$ is updated with the time of refresh.
In the case of a fast refresh, an additional step is performed:
5. Rows which are no longer needed for a refresh by any mview are deleted from the mview log - .MLOG$_.
It really confuses me :
1. SYS.SNAP$ and SYS.MLOG$ are updated to show the time of refresh.
--> Understood , Perfect
2. If a complete refresh on only one mview is performed using the DBMS_MVIEW.REFRESH() api, the mview base table is truncated.
--> Understood , It should be like that
If the refresh is fast, or involves multiple mviews, or is being performed on a refresh group, rows in the mview base table(s) are deleted.
--> What is the meaning of 'rows in the mview base table(s) are deleted ' ? rows means all the rows or the rows which logged in mv log ? Biggest confusion
3. All rows selected from the master table are inserted into the snapshot base table.
--> All rows selected from master table ? All rows means what ? it sounds incorrect in case of fast refresh
4. SYS.SLOG$ is updated with the time of refresh.
In the case of a fast refresh, an additional step is performed:
--> Understood , Perfect
5. Rows which are no longer needed for a refresh by any mview are deleted from the mview log - .MLOG$_.
--> Understood , Perfect .
Could any Xpert give a clear explanation ?
1. www.dbasupport.com
2. www.dbforums.com
3. www.itpub.net
4. www.csdn.net
5. www.umlchina.com
6. www.tek-tips.com
7. www.cnforyou.com
8. fm365.federal.com.cn
9. www.programmersheaven.com
10.http://msdn.microsoft.com/library/default.asp
ligang1000@hotmail.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Click Here to Expand Forum to Full Width
|
|