1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > oracle impdp优化 ORACLE IMPDP优化调整

oracle impdp优化 ORACLE IMPDP优化调整

时间:2018-10-14 00:02:24

相关推荐

oracle impdp优化 ORACLE IMPDP优化调整

IMPDP优化调整:

1.通过设置PARALLEL来提高IMPDP的并行度。

SQL> show parameter cpu

NAME TYPE VALUE

------------------------------------

--------------------------------- ---------------------------

cpu_count integer 8

parallel_threads_per_cpu integer 2

关于 parallel_threads_per_cpu 参数的解释:

The parameter describes the number of parallel execution

processes or threads that a CPU can handle during parallel

execution.

这个参数也就是说一个CPU 能处理多少个进程

结论:parallel 设置为

cpu_count*parallel_threads_per_cpu-1能获得最好的性能。

如果有order by 操作 那么并行度=cpu_count*parallel_threads_per_cpu/2-1

2.将导出的数据写入多个数据文件

1>先看直接导出的性能:

$ expdp zhejiang/zhejiang directory=d_test

dumpfile=zhejiang.dp

整个导出操作大概用了14分半,

2>尝试使用并行度2进行导出,这时仍然设置一个导出的数据文件:

$ expdp zhejiang/zhejiang directory=d_test

dumpfile=zhejiang_p2_1file.dp parallel=2

整个导入过程不到14分钟,不过这个性能的提升实在不是很明显。不过这是有原因的,由于设置了并行度,两个进程在同时执行导出操作,但是二者要将导出的数据写入同一个数据文件中,因此必然会导致资源的争用

3>仍然使用并行度2,但是同时设置两个数据文件再次检查导出性能:

$ expdp zhejiang/zhejiang directory=d_test

dumpfile=zhejiang_p2_2file1.dp,zhejiang_p2_2file2.dp parallel=2

这次导出仅仅用了10分半,导出的效率大大的提高。结论:当提高并行度时,将导出的数据写入X多个数据文件(X等于并行数),可以进一步提高导出性能。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。