Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1749677
  • 博文数量: 1647
  • 博客积分: 80000
  • 博客等级: 元帅
  • 技术积分: 9980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 15:15
文章分类

全部博文(1647)

文章存档

2011年(1)

2008年(1646)

我的朋友

分类:

2008-10-28 17:53:30

  在导入数据的时候,如果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.")

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

  看来也通过批量绑定来提高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……

【责编:Amy】

--------------------next---------------------

阅读(251) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~