Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1752545
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: DB2/Informix

2013-03-22 22:13:31

Every once in a while I completely miss a feature added to DB2.   This time I missed what I would call a biggie; a way to significantly improve the performance of your DB2 UNLOAD and LOAD utilities. 

 

Sometime the middle of last year, around May 2011, APAR PM19584 arrived for DB2 9 for z/OS and DB2 10 for z/OS that added the FORMAT INTERNAL keyword to both the DB2 UNLOAD and LOAD utilities.

 

If the DB2 UNLOAD utility is run with the FORMAT INTERNAL option, the data is unloaded in DB2’s internal format, nothing at all happens to the data during the unload process.  No data or CCSID conversions are performed and any field specifications are ignored.   There are additional warnings and restrictions listed in the “DB2 10 Utility Guide and Reference” (SC19-2984) product publication.

 

Using a file created by the UNLOAD utility that specified FORMAT INTERNAL as input to the LOAD utility, also specifying FORMAT INTERNAL as an option on the LOAD,  has the potential of significantly improving the LOAD’s performance because there is no validation of the data performed on the input file.  DB2 assumes the input is in DB2’s internal format and will perform no data conversions and ignores any field specifications.   Again, additional detail about using the FORMAT INTERNAL option on the LOAD utility can be found in the “DB2 10 Utility Guide and Reference” (SC19-2984) product publication.

 

The DB2 catalog table SYSIBM.SYSCOPY will reflect that the LOAD used an input in a DB2 internal format.  If ICTYPE is “Y” for LOAD LOG(NO) or “Z” for LOAD LOG(YES), TTYPE is set to an “I” to indicate that the FORMAT INTERNAL option was specified for that LOAD.

 

If you have a need to unload data from a table that will only be used to load a table that has the exact same structure, this could be the performance options you’re looking for.   

 

Check it out.   I think you’ll like it if it fits your situation. 

 

BTW, the above APAR also introduced the LOAD utility option PRESORTED YES.   When specified, the LOAD assumes the input is in clustering key order.  Because the input is in clustering key order, LOAD can skip any sorts for the clustering index.   This also has the potential for some significant performance improvements.
ref: ###############.com

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