|
最初由 biti_rainy 发布
[B]顺道说一点oracle 的增量刷新:对于 oracle 的 mv log 的增量刷新,不知道大家有多少人研究过增量刷新的本质(通过oracle sql trace 可以跟踪出来),kamus 去年写过一个文章讲述这个问题,刷新的本质,就是 mv log 本身就是一个 mlog$ 表,记录了变化数据的主键等信息,然后把这个表和 主表做join 然后读到 刷新目的地,再逐条更新 mlog$ 表中的数据的状态(如果只有一个目的地注册则就是删除)。
原理很简单,你就可以理解为自己用 trigger 记录下了 表变化的数据的pk然后同步到其他数据库。
如果网络状况不好,数据库特别大,第一次刷新的时候将是一个巨大的问题。 [/B]
just to make it complete, in the case of updatable snapshot, in the delete phase of the fast refresh, the SQL query to choose the data to delete is a UNION ALL of the mlog$ and the updatable snapshot log ( uslog$) . |
|