查看: 27072|回复: 37

[精华] 晶晶实验二十二之 直接路径插入篇

[复制链接]
论坛徽章:
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
1#
发表于 2008-4-3 12:13 | 显示全部楼层
Great posting! I'm learning from your posting.

Some minor comments. v$bh.objd is better matched against data_object_id. Some operations can change it to a value higher than object_id.

将buffer cache清空, why not alter system flush buffer cache (or ALTER SESSION SET EVENTS 'immediate trace name flush_cache' in 9i). I remember somebody posted a test that seems to show bouncing the database could actually pre-load some block buffers and manually flushing it removes this artifact. But I never chased down the root cause.

If you really want to avoid going through buffer cache even for the select part (which does a full table scan), you can alter session set "_serial_direct_read"=true before the insert select.

I've never tested but can you test setting _idl_conventional_index_maintenance to false and see if the index can also behave the same way as the table in direct path insert? (I don't have access to a database right now.)

Yong Huang

使用道具 举报

回复
论坛徽章:
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
2#
发表于 2008-4-4 04:48 | 显示全部楼层
原帖由 晶晶小妹 于 2008-4-3 07:59 发表
YONG HUANG:我英文不好..看的头晕..
If you really want to avoid going through buffer cache even for the select part (which does a full table scan),

这句话中的EVEN,是不是只是做加强语气用的一个副词?可以翻译为甚至.或者不必翻译?


翻译为甚至. Hope everything else is clear.

Yong Huang

使用道具 举报

回复
论坛徽章:
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
3#
发表于 2008-4-6 13:59 | 显示全部楼层
原帖由 eagle_fan 于 2008-4-3 23:23 发表

Considering the index maintenance mechanism, how can you expert index using direct path insert


I thought about that. But was just curious about the description of this parameter _idl_conventional_index_maintenance, "enable conventional index maintenance for insert direct load". What could that mean? Maybe it's only about the indexes on those IDL% tables?

Yong Huang

使用道具 举报

回复
论坛徽章:
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
4#
发表于 2008-4-7 00:02 | 显示全部楼层
原帖由 Yong Huang 于 2008-4-5 23:59 发表

I thought about that. But was just curious about the description of this parameter _idl_conventional_index_maintenance, "enable conventional index maintenance for insert direct load". What could that mean? Maybe it's only about the indexes on those IDL% tables?

Yong Huang


I did a test. That mysterious parameter has no effect. I would be surprised if there was some magic here. Data in an index has to be stored in order.

Yong Huang

使用道具 举报

回复
论坛徽章:
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
5#
发表于 2010-10-8 02:12 | 显示全部楼层
> ctas直接路径插入的数据不在SGA中(目标数据),推测应该是在PGA中

That data, during CTAS, is in the target tablespace datafile as a temporary segment. It's NOT in PGA.

Yong Huang

使用道具 举报

回复

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

本版积分规则 发表回复

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