楼主: yangtingkun

[原创] 物化视图及日志内部机制的一点研究

[复制链接]
论坛徽章:
14
授权会员
日期:2005-10-30 17:05:332011新春纪念徽章
日期:2011-02-18 11:43:36生肖徽章2007版:牛
日期:2009-02-20 15:06:152009新春纪念徽章
日期:2009-01-04 14:52:28生肖徽章2007版:龙
日期:2008-12-25 11:27:31生肖徽章2007版:鼠
日期:2008-01-02 17:35:53生肖徽章2007版:鸡
日期:2008-01-02 17:35:53数据库板块每日发贴之星
日期:2006-05-24 01:01:36会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07
11#
发表于 2006-6-7 14:46 | 只看该作者

使用道具 举报

回复
论坛徽章:
3
授权会员
日期:2006-04-18 13:25:09生肖徽章2007版:猴
日期:2009-02-04 17:50:05ITPUB学员
日期:2011-08-03 10:55:36
12#
发表于 2006-6-8 00:22 | 只看该作者
多谢杨斑竹 最近马上也要研究MV

使用道具 举报

回复
论坛徽章:
8
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:512012新春纪念徽章
日期:2012-01-04 11:55:42双黄蛋
日期:2012-11-01 09:28:32茶鸡蛋
日期:2012-11-29 17:03:32迷宫蛋
日期:2013-01-05 09:48:21双黄蛋
日期:2013-01-23 17:20:202014年新春福章
日期:2014-02-18 16:43:09马上有钱
日期:2014-02-18 16:43:09
13#
发表于 2010-1-27 09:36 | 只看该作者

使用道具 举报

回复
论坛徽章:
71
ITPUB元老
日期:2009-11-30 15:55:11授权会员
日期:2009-11-30 11:36:17ITPUB季度 技术新星
日期:2010-08-31 10:47:25优秀写手
日期:2014-12-24 06:00:14ITPUB8周年纪念徽章
日期:2009-09-27 10:21:20祖国60周年纪念徽章
日期:2009-10-09 08:28:00奔驰
日期:2013-10-20 13:32:09数据库板块每日发贴之星
日期:2008-10-03 01:02:14数据库板块每日发贴之星
日期:2009-11-23 01:01:03数据库板块每日发贴之星
日期:2010-07-27 01:01:02
14#
发表于 2010-4-11 20:04 | 只看该作者
好详细,原来杨版主5年前就这么厉害了!

使用道具 举报

回复
论坛徽章:
9
ITPUB社区OCM联盟徽章
日期:2013-03-27 11:17:11奥运纪念徽章
日期:2013-06-18 09:13:52ITPUB社区千里马徽章
日期:2013-08-22 09:58:03大众
日期:2013-08-30 14:51:33路虎
日期:2013-12-01 18:25:42
15#
发表于 2011-9-4 13:22 | 只看该作者
GOOD 版主研究很透。

使用道具 举报

回复
论坛徽章:
9
ITPUB社区OCM联盟徽章
日期:2013-03-27 11:17:11奥运纪念徽章
日期:2013-06-18 09:13:52ITPUB社区千里马徽章
日期:2013-08-22 09:58:03大众
日期:2013-08-30 14:51:33路虎
日期:2013-12-01 18:25:42
16#
发表于 2011-9-4 13:35 | 只看该作者
SQL> create materialized view oo
  2  refresh complete
  3  enable query rewrite
  4  as
  5  select * from test;
select * from test
              *
ERROR at line 5:
ORA-12014: table 'TEST' does not contain a primary key constraint
我的表中没有主键。
SQL> create materialized view oo
  2  refresh complete with rowid
  3  as
  4  select * from test;

Materialized view created.

使用RIWID可以完成。我想问问,在完全刷新中ROWID或者主键到底起到什么作用?
快速刷新应该比较好理解,用于定位刷新哪些行。但是完全刷新,就是DELETE然后倒入数据啊,没用到主键或者ROWID啊

使用道具 举报

回复
论坛徽章:
9
ITPUB社区OCM联盟徽章
日期:2013-03-27 11:17:11奥运纪念徽章
日期:2013-06-18 09:13:52ITPUB社区千里马徽章
日期:2013-08-22 09:58:03大众
日期:2013-08-30 14:51:33路虎
日期:2013-12-01 18:25:42
17#
发表于 2011-9-4 14:13 | 只看该作者
WITH SEQUENCE在刷新的时候有什么特别的用处没有?
谢谢!

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
18#
发表于 2011-9-5 02:38 | 只看该作者
> WITH SEQUENCE在刷新的时候有什么特别的用处没有?

You must be referring to the "create materialized view log" statement. Documentation says

http://download.oracle.com/docs/ ... statements_6003.htm

"Specify SEQUENCE to indicate that a sequence value providing additional ordering information should be recorded in the materialized view log. Sequence numbers are necessary to support fast refresh after some update scenarios."

"To provide for fast refresh of materialized *aggregate* views, you must also specify the SEQUENCE and..." [my emphasis]

http://download.oracle.com/docs/ ... /b14223/basicmv.htm

"Oracle recommends that the keyword SEQUENCE be included in your materialized view log statement unless you are sure that you will never perform a mixed DML operation (a combination of INSERT, UPDATE, or DELETE operations on multiple tables). The SEQUENCE column is required in the materialized view log to support fast refresh with a combination of INSERT, UPDATE, or DELETE statements on multiple tables."

Yong Huang

使用道具 举报

回复
论坛徽章:
4
祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:20:57ITPUB9周年纪念徽章
日期:2010-10-08 09:34:02ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28
19#
发表于 2011-9-28 11:04 | 只看该作者
楼主辛苦了,这么好的文章需要顶起来。

使用道具 举报

回复
论坛徽章:
0
20#
发表于 2011-11-17 11:54 | 只看该作者
挺好的

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表