客户一个十几个G的用户尝试使用IMP导入到数据库中,执行时间超过了2天。
数据库版本为10.2.0.5 FOR LINUX X86-64,而导入的dmp文件是在10.2.0.3 FOR LINUX X86平台上导出的,这个用户包含了OLAP组件。
整个导入过程异常缓慢,一共不到20G的数据量,导入的时间超过了两天。虽然imp导入效率不高,但是也没有理由慢到如此地步,通过10046跟踪imp进程:
*** 2012-08-07 17:25:03.099 *** ACTION NAME:() 2012-08-07 17:25:03.051 *** MODULE NAME:(imp@db (TNS V1-V3)) 2012-08-07 17:25:03.051 *** SERVICE NAME:(SYS$USERS) 2012-08-07 17:25:03.051 *** SESSION ID:(880.53796) 2012-08-07 17:25:03.051 ===================== PARSING IN CURSOR #61 len=6 dep=1 uid=100 oct=44 lid=100 tim=5574818059202 hv=255718823 ad='0' COMMIT END OF STMT PARSE #61:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=0,tim=5574818059197 XCTEND rlbk=0, rd_only=1 EXEC #61:c=0,e=4723,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=0,tim=5574818115096 ===================== PARSING IN CURSOR #3 len=29323 dep=0 uid=100 oct=47 lid=100 tim=5574818115145 hv=1172437913 ad='fe303758' BEGIN dbms_aw_exp.import_chunk100(1492, 'AADavwAAKAAAAAYAAADavwAAKQAAAAYAAADavwAAKgAAAAYAAADavwAAKwAAAAYA AADavwAALAAAAAYAAADavwAALQAAAAYAAADavwAALgAAAAYAAADavwAALwAAAAYA AADavwAAJAAAAAYAAABy0wAAJQAAAAYAAABy0wAAJgAAAAYAAABy0wAAJwAAAAYA AABy0wAAKAAAAAYAAABy0wAAKQAAAAYAAABy0wAAKgAAAAYAAABy0wAAKwAAAAYA AABy0wAALAAAAAYAAABy0wAALQAAAAYAAABy0wAALgAAAAYAAABy0wAALwAAAAYA AABy0wAAJAAAAAYAAAC90wAAJQAAAAYAAAC90wAAJgAAAAYAAAC90wAAJwAAAAYA AAC90wAAKAAAAAYAAAC90wAAKQAAAAYAAAC90wA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wAAJwAAAAYA AAAOxwAAKAAAAAYAAAAOxwAAKQAAAAYAAAAOxwAAKgAAAAYAAAAOxwAAKwAAAAYA AAAOxwAALAAAAAYAAAAOxwAALQAAAAYAAAAOxwAALgAAAAYAAAAOxwAALwAAAAYA AAAOxwAAJAAAAAYAAAAMpAAAJQAAAAYAAAAMpAAAJgAAAAYAAAAMpAAAJwAAAAYA AAAMpAAAKAAAAAYAAAAMpAAAKQAAAAYAAAAMpAAAKgAAAAYAAAAMpAAAKwAAAAYA AAAMpAAALAAAAAYAAAAMpAAALQAAAAYAAAAMpAAALgAAAAYAAAAMpAAALwAAAAYA AAAMpAAAJAAAAAYAAABXwwAAJQAAAAYAAABXwwAAJgAAAAYAAABXwwAAJwAAAAYA AABXwwAAKAAAAAYAAABXwwAAKQAAAAYAAABXwwAAKgAAAAYAAABXwwAAKwAAAAYA AABXww=='); dbms_aw_exp.import_chunk100(1492, 'AAAsAAAABgAAAFfDAAAtAAAABgAAAFfDAAAuAAAABgAAAFfDAAAvAAAABgAAAFfD AAAkAAAABgAAAC66AAAlAAAABgAAAC66AAAmAAAABgAAAC66AAAnAAAABgAAAC66 AAAoAAAABgAAAC66AAApAAAABgAAAC66AAAqAAAABgAAAC66AAArAAAABgAAAC66 AAAsAAAABgAAAC66AAAtAAAABgAAAC66AAAuAAAABgAAAC66AAAvAAAABgAAAC66 AAAkAAAABgAAALLAAAAlAAAABgAAALLAAAAmAAAABgAAALLAAAAnAAAABgAAALLA AAAoAAAABgAAALLAAAApAAAABgAAALLAAAAqAAAABgAAALLAAAArAAAABgAAALLA AAAsAAAABgAAALLAAAAtAAAABgAAALLAAAAuAAAABgAAALLAAAAvAAAABgAAALLA AAAkAAAABgAAAAC8AAAlAAAABgAAAAC8AAAmAAAABgAAAAC8AAAnAAAABgAAAAC8 AAAoAAAABgAAAAC8AAApAAAABgAAAAC8AAAqAAAABgAAAAC8AAArAAAABgAAAAC8 AAAsAAAABgAAAAC8AAAtAAAABgAAAAC8AAAuAA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C0A AAAjAAAABUwAACkAAAAjAAAAn2kAAC4AAAAjAAAAn2kAAC0AAAAjAAAAYHAAACQA AAAjAAAA43AAACUAAAAjAAAA43AAACgAAAAjAAAA43AAACkAAAAjAAAA43AAAC0A AAAjAA=='); dbms_aw_exp.import_chunk100(1492, 'AADjcAAAJAAAACMAAABNcwAAJQAAACMAAABNcwAAJwAAACMAAABNcwAAKAAAACMA AABNcwAAKQAAACMAAABNcwAALQAAACMAAABNcwAALQAAACMAAAB9dAAAJAAAACMA AABBpwAAJQAAACMAAABBpwAALQAAACMAAABBpwAAJAAAACMAAADiwwAAJQAAACMA AADiwwAAJwAAACMAAADiwwAAKAAAACMAAADiwwAALQAAACMAAACIEwAALQAAACMA AADBcAAAJAAAACMAAAC7EgAAJQAAACMAAAC7EgAAKQAAACMAAAC7EgAAKQAAACMA AAD6EgAALQAAACMAAAD6EgAAJAAAACMAAACNGgAAJQAAACMAAACNGgAAJwAAACMA AACNGgAALQAAACMAAACNGgAALQAAACMAAABLKQAALQAAACMAAADvMAAALQAAACMA AAAeQAAALQAAACMAAAD0QAAAJAAAACMAAAD1RgAAJQAAACMAAAD1RgAAJwAAACMA AAD1RgAAKQAAACMAAAD1RgAALQAAACMAAAD1RgAAJAAAACMAAAB7RwAAJQAAACMA AAB7RwAAKAAAACMAAAD2TQAALQAAACMAAAD2TQAAJAAAACMAAADnTgAAJQAAACMA AADnTgAAJwAAACMAAADnTgAAKAAAACMAAADnTgAALQAAACMAAADnTgAALQAAACMA AABTcAAAJwAAACMAAAD3qwAAKQAAACMAAAD3qwAAJwAAACMAAAA3FAAALQAAACMA AACkSgAAJwAAACMAAAC8owAAKAAAACMAAAApKgAAKQAAACMAAAApKgAALQAAACMA AAA5cQAAJAAAACMAAABMowAAJQAAACMAAABMowAAJAAAACMAAABeowAAJQAAACMA AABeowAALQAAACMAAABeowAALQAAACMAAAAaEAAAJAAAACMAAADORAAAJQAAACMA AADORAAALQAAACMAAADORAAAJAAAACMAAACQaQAAJQAAACMAAACQaQAALQAAACMA AACQaQAALQAAACMAAACNaQAAJAAAACMAAABtowAAJQAAACMAAABtowAALQAAACMA AABtTwAALQAAACMAAACYnAAALQAAACMAAADrogAAJAAAACMAAABPowAAJQAAACMA AABPowAALQAAACMAAABhowAAJAAAACMAAABSpAAAJQAAACMAAABSpAAALQAAACMA AABSpAAALQAAACMAAACPKgAAJAAAACMAAABRCgAAJQAAACMAAABRCgAAJwAAACMA AABRCgAAKAAAACMAAABRCgAAKQAAACMAAABRCgAALQAAACMAAABRCgAALQAAACMA AADuFgAAJAAAACMAAAB4MQAAJQAAACMAAAB4MQAAJwAAACMAAAB4MQAAKQAAACMA AAB4MQAALQAAACMAAAB4MQAALgAAACMAAABiTgAAJAAAACMAAAALTwAAJQAAACMA AAALTwAALQAAACMAAAALTwAAKAAAACMAAABwRgAALQAAACMAAAB8SQAALQAAACMA AADGGAAAJwAAACMAAABmQwAAKAAAACMAAABmQwAALQAAACMAAABmQwAAJAAAACMA AABvUAAAJQAAACMAAABvUAAAKAAAACMAAABvUAAAKQAAACMAAABvUAAALQAAACMA AABvUAAALQAAACMAAABlSQAAJAAAACMAAADWDQAAJQAAACMAAADWDQAAJwAAACMA AADWDQAAKAAAACMAAADWDQAALQAAACMAAADWDQAAJAAAACMAAABaEQAAJQAAACMA AABaEQAAJwAAACMAAABaEQAAKAAAACMAAABaEQAAKQAAACMAAABaEQAALQAAACMA AABaEQAAJAAAACMAAACVFQAAJQAAACMAAACVFQAALQAAACMAAACVFQAAJAAAACMA AAAzGAAAJQAAACMAAAAzGAAALQAAACMAAAAzGAAAJAAAACMAAADOHQAAJQAAACMA AADOHQ=='); . . . |
整个10046的TRACE文件都充斥着dbms_aw_exp.import_chunk100过程的调用。这个过程的目的是为了exp/imp过程可以跨平台,跨32/64位环境而对于OLAP数据进行的特殊处理。这个过程的效率非常低,也就造成了IMP导入的效率低下。
其实Oracle对于包含OLAP数据的用户迁移提供了专门的工具OLAP DML IMPORT/EXPORT,使用这个工具处理OLAP组件的数据是十分高效的。而传统的EXP/IMP在处理用户数据时没有问题,但是当需要导入OLAP元数据时,就会导致异常低效的问题,而如果IMP导入已经开始,那么也没有什么太好的办法,只好等它自己结束了。