12
返回列表 发新帖
楼主: ora_newbie

对临时段文件生成UNDO有什么意义呢?

[复制链接]
论坛徽章:
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
11#
发表于 2009-9-11 02:42 | 只看该作者
原帖由 alantany 于 2009-9-9 18:59 发表
这应该是一些维护字典表的undo,并非数据产生的Undo,比如extent扩展啊之类的东西。


That makes sense. But if the initial temp segment is already created and you keep inserting one row at a time into the simplest GTT (e.g. one that only has one single column of type number), "undo change vector size" still goes up. V$sort_usage doesn't say the temporary segment is using more and more blocks (mine stays at 256). But at this time, my v$transaction.used_urec increments by 1 every time I insert a row into my GTT.

So I don't think it's extent being extended. Got to be something. There're some undo related events (10221 for exampel). When I have time, I'll take a look at it.

Yong Huang

使用道具 举报

回复
论坛徽章:
24
2010年世界杯参赛球队:韩国
日期:2009-12-20 20:11:33天枰座
日期:2015-07-18 17:23:54托尼托尼·乔巴
日期:2017-01-25 09:38:19秀才
日期:2017-03-02 10:30:14秀才
日期:2017-03-02 10:30:35秀才
日期:2017-06-29 10:16:48技术图书徽章
日期:2017-07-11 09:10:26乌索普
日期:2023-01-05 23:01:5220周年集字徽章-年	
日期:2021-05-27 09:37:50蒙奇·D·路飞
日期:2022-10-27 21:49:38
12#
发表于 2009-9-11 11:05 | 只看该作者
原帖由 Yong Huang 于 2009-9-11 02:42 发表


That makes sense. But if the initial temp segment is already created and you keep inserting one row at a time into the simplest GTT (e.g. one that only has one single column of type number), "undo change vector size" still goes up. V$sort_usage doesn't say the temporary segment is using more and more blocks (mine stays at 256). But at this time, my v$transaction.used_urec increments by 1 every time I insert a row into my GTT.

So I don't think it's extent being extended. Got to be something. There're some undo related events (10221 for exampel). When I have time, I'll take a look at it.

Yong Huang



I have some procedures will use temp table and return refcursor:


        OPEN O_REF FOR  SELECT * FROM TMP_table
        DELETE FROM tmp_table  ;
        COMMIT;

I can fetch data from O_REF, I believe it will read the data from undo.

What I think is undo for temp segment should be necessary because  an transaction need to rollback if it fails.

[ 本帖最后由 dhhb 于 2009-9-11 16:30 编辑 ]

使用道具 举报

回复
论坛徽章:
1
2011新春纪念徽章
日期:2011-02-18 11:42:49
13#
发表于 2009-12-10 16:35 | 只看该作者
回滚、数据恢复、读一致性,还有闪回。

使用道具 举报

回复

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

本版积分规则 发表回复

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