I am trying to understand the below content from http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9042180525899 and have some questions. My questions are highlighted in BOLD and in brackets) .
Appreciate your response. Sorry I am not posting at asktom site. i never used that site before to post questions.
CONTENT
snaptime$$ is modified upon a refresh and is only used when there are multiple snapshots
defined on a single master.
When a snapshot refreshes -- it sets this column to the time it did its refresh. That
way, when it refreshes later -- it can skip rows it already did.
Say you have two snapshots S1 and S1. You have a master table M.
You have a snapshot log with:
1 01014000 00:00:00 I N
in it. Say it is now noon on April 4th 2003. S1 was last refreshed at 11am on the same
day. S2 was last refreshed at 9am that morning. S1 refreshes by pulling every change [ Is S1 being refreshed at 12PM ???]
from the snapshot log where snaptime$$ is greater then 11am April 4th 2003. That record
from the year 4000 is so it gets applied. When S1 is done, the snapshot log would have:
1 04042003 12:00:00 I N [ Is this timestamp saying 12PM OR 12AM ???]
Now at 1pm, S1 refreshes again
. Nothing happens -- there are no newer records to
process. [ If the timestamp in MLOG$_ is showing 12PM and it is now 1PM, How does oracle know it is already inserted? where does oracle mark that this record that it is already inserted in snapshot S1 at 12PM? ]
At 1:05pm, S2 refreshes. The record in there happened after 9am (S2's last
refresh i.e., [Is it based on 12PM showing in the MLOG$_ ?] ) so it pulls it. Since S2 is the last snapshot in need of refresh from this
record -- it is removed from the log.
So, snaptime$$ is used to coordinate multiple snapshots using the same log.