什么原因导致load如此之慢
资料简介:
环境:hp-unix
版本:DB2 v8.2
描述:在load一个百万级的表数据时(DEL文件约200MB),执行了大约40-50分钟,一直没有停止,就用with ur查询了一下该表的数据,发现导入的条数已经够了,就强行终止了load操作。这时再查询数据时,发现除了一个decimal(14,2)的列全为null外(备份中该列很少为null,基本都是负数),其他列数据都正常。后来,又用20条数据的备份做了load的操作,这次成功完成的,但是极慢,用了大约2分钟。
当然,这些操作都是在系统空闲时做的。
请大家帮忙看一下,会是什么原因导致load慢成这样?
第一次强行终止后的提示信息:
-------------------------------------
SQL3107W There is at least one warning message in the message file.
SQL3005N Processing was interrupted. SQLSTATE=00000
Agent Type Node SQL Code Result
______________________________________________________________________________
LOAD 001 +00003107 Success.
______________________________________________________________________________
LOAD 002 +00003107 Success.
______________________________________________________________________________
LOAD 003 +00003107 Success.
______________________________________________________________________________
LOAD 004 +00003107 Success.
______________________________________________________________________________
LOAD 005 +00003107 Success.
______________________________________________________________________________
LOAD 006 +00003107 Success.
______________________________________________________________________________
LOAD 007 +00003107 Success.
______________________________________________________________________________
PARTITION 000 +00000000 Success.
______________________________________________________________________________
PRE_PARTITION 000 +00000000 Success.
______________________________________________________________________________
RESULTS: 7 of 7 LOADs completed successfully.
______________________________________________________________________________
Summary of Partitioning Agents:
Rows Read = 1759936
Rows Rejected = 0
Rows Partitioned = 1759936
Summary of LOAD Agents:
Number of rows read = 1759936
Number of rows skipped = 0
Number of rows loaded = 1759936
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 1759936
版本:DB2 v8.2
描述:在load一个百万级的表数据时(DEL文件约200MB),执行了大约40-50分钟,一直没有停止,就用with ur查询了一下该表的数据,发现导入的条数已经够了,就强行终止了load操作。这时再查询数据时,发现除了一个decimal(14,2)的列全为null外(备份中该列很少为null,基本都是负数),其他列数据都正常。后来,又用20条数据的备份做了load的操作,这次成功完成的,但是极慢,用了大约2分钟。
当然,这些操作都是在系统空闲时做的。
请大家帮忙看一下,会是什么原因导致load慢成这样?
第一次强行终止后的提示信息:
-------------------------------------
SQL3107W There is at least one warning message in the message file.
SQL3005N Processing was interrupted. SQLSTATE=00000
Agent Type Node SQL Code Result
______________________________________________________________________________
LOAD 001 +00003107 Success.
______________________________________________________________________________
LOAD 002 +00003107 Success.
______________________________________________________________________________
LOAD 003 +00003107 Success.
______________________________________________________________________________
LOAD 004 +00003107 Success.
______________________________________________________________________________
LOAD 005 +00003107 Success.
______________________________________________________________________________
LOAD 006 +00003107 Success.
______________________________________________________________________________
LOAD 007 +00003107 Success.
______________________________________________________________________________
PARTITION 000 +00000000 Success.
______________________________________________________________________________
PRE_PARTITION 000 +00000000 Success.
______________________________________________________________________________
RESULTS: 7 of 7 LOADs completed successfully.
______________________________________________________________________________
Summary of Partitioning Agents:
Rows Read = 1759936
Rows Rejected = 0
Rows Partitioned = 1759936
Summary of LOAD Agents:
Number of rows read = 1759936
Number of rows skipped = 0
Number of rows loaded = 1759936
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 1759936
2008-12-19
浏览13126
下载1
已下载用户的评价7.09分
您还未下载该资料,不能发表评价;
查看我的 待评价资源
查看我的 待评价资源
Felix数据仓库工程师亚信联创科技(北京)有限公司
没用
是啊,呵呵。总觉得DEL,Exportload是非常通用的,而且之前也没遇到过问题,所以就很难会想到这里:$ Export: db2 export to /dataFile/fee_detail_mon.del of del modified by coldel, select * from data.fee_detail_mon Load: db2 load from /dataFile/fee_detail_mon.del of del insert into data.fee_detail_mon nonrecoverable DEL文件: "200806",+00000110619480.,+00000110619704.,"07"," "," ","20","200806","20456 ",-000001133810.00 "200806",+00000146991303.,+00000147486829.,"12"," "," ","20","200806","20456 ",-000000800000.00
是啊,呵呵。总觉得DEL,Exportload是非常通用的,而且之前也没遇到过问题,所以就很难会想到这里:$ Export: db2 export to /dataFile/fee_detail_mon.del of del modified by coldel, select * from data.fee_detail_mon Load: db2 load from /dataFile/fee_detail_mon.del of del insert into data.fee_detail_mon nonrecoverable DEL文件: "200806",+00000110619480.,+00000110619704.,"07"," "," ","20","200806","20456 ",-000001133810.00 "200806",+00000146991303.,+00000147486829.,"12"," "," ","20","200806","20456 ",-000000800000.00
Felix数据仓库工程师亚信联创科技(北京)有限公司
没用
你说的是DEL吧,上面帖子中的“原DEL中数据”就是export出来后的样子。 我以前在windows和aix上用的都是9.1的DB2,是没问题的,所以这次出问题一直没往这儿想,感觉很奇怪。
你说的是DEL吧,上面帖子中的“原DEL中数据”就是export出来后的样子。 我以前在windows和aix上用的都是9.1的DB2,是没问题的,所以这次出问题一直没往这儿想,感觉很奇怪。
Felix数据仓库工程师亚信联创科技(北京)有限公司
没用
OK,问题终于找到了。其实并没有那么复杂,就是DEL格式的问题,导致在load一个数据列时出错,使整个LOAD过程因此而不能停止。 DEL中出错列是行的最后一列,类型为decimal(14,2),只差了一个“[color=red],[/color]”。 原DEL中数据: "200806",+00000110619480.,+00000110619704.,"07"," "," ","20","200806","20456 ",-000001133810.00 "200806",+00000146991303.,+00000147486829.,"12"," "," ","20","200806","20456 ",-000000800000.00 修改后: "200806",+00000110619480.,+00000110619704.,"07"," "," ","20","200806","20456 ",-000001133810.00[color=red],[/color] "200806",+00000146991303.,+00000147486829.,"12"," "," ","20","200806","20456 ",-000000800000.00[color=red],[/color] [color=#ff0000][/color] [color=#ff0000]最后一个疑问:export时怎么样设置可以使导出的DEL直接可以LOAD?[/color]
OK,问题终于找到了。其实并没有那么复杂,就是DEL格式的问题,导致在load一个数据列时出错,使整个LOAD过程因此而不能停止。 DEL中出错列是行的最后一列,类型为decimal(14,2),只差了一个“[color=red],[/color]”。 原DEL中数据: "200806",+00000110619480.,+00000110619704.,"07"," "," ","20","200806","20456 ",-000001133810.00 "200806",+00000146991303.,+00000147486829.,"12"," "," ","20","200806","20456 ",-000000800000.00 修改后: "200806",+00000110619480.,+00000110619704.,"07"," "," ","20","200806","20456 ",-000001133810.00[color=red],[/color] "200806",+00000146991303.,+00000147486829.,"12"," "," ","20","200806","20456 ",-000000800000.00[color=red],[/color] [color=#ff0000][/color] [color=#ff0000]最后一个疑问:export时怎么样设置可以使导出的DEL直接可以LOAD?[/color]