频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

imp buffer=? & array insert

来源: 作者: 出处:巧巧读书 2006-08-02 进入讨论组

  在导入数据的时候,如果commit=Y,则由参数Buffer决定导入过程中什么时候做Commit操作。*(Note:"For tables containing LONG, LOB, BFILE, REF, ROWID, UROWID columns, array inserts are not done. If COMMIT=y, Import commits these tables after each row.")

  导入的时候,Oracle使用Array Insert.将record从dmp file中读取到imp process buffer中,当buffer“满”的时候,Bind Array,执行Insert.

  看来Oracle也通过批量绑定来提高imp性能,以前还以为是read one record,insert one record,read one record,insert one record……

********************************************************************************

INSERT /*+NESTED_TABLE_SET_REFS+*/ INTO "T_1K" ("X")VALUES (:1)

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- -------
Parse 1 0.00 0.01 0 4 0 0
Execute 102 0.02 0.04 0 11 174 6601
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- -------
total 103 0.02 0.05 0 15 174 6601

Misses in library cache during parse: 1

********************************************************************************

  表T_1K每个记录在imp的时候占用大概1k的buffer,如上是设置了buffer=64k imp的结果。

  Array Bind (Commit)102次,导入纪录6601条

  6601/102 =64.7156863 about 64 rows/insert, using a 64k buffer —— that makes sense

  看不出Oracle内部使用array bind 的地方挺多的: arraysize in sqlplus, Forall bind / fetch in PL/SQL……

转载保留:http://www.qqread.com/oracle/2006/08/b116189052.html进入讨论组讨论。
收藏此文】【 】【打印】【关闭
较早的文章:Index Range Scan

较新的文章:pessimistic锁定对optimistic锁定(2)
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章