在 expdp 和 impdp 中,可以通过并行( parallel 参数)来提高导出导入速率。这个参数会受到 cpu 和 I/O 影响。所以在使用 parallel 参数时,需要在资源消耗和运行时间之间进行权衡。
Parallel 参数默认值为 1 ,当 parallel 值设置为 3 时,则表示 最多 会有三个线程处理,而不是一定会有三个线程处理。由于同一时间内,一个 dump 文件只有一个线程进行处理。所以输出的文件若只有一个,那么就算 parallel=4 ,也只有一个线程在工作。
1. Expdp 中的 parallle 参数 filesize 可以配合使用
Parallel: 执行最大线程数(并行读)
Filesize: 指定单个文件大小。通过指定文件的大小,来指定文件的数量。
摘抄官方文档的一句话: The value you specify for integer should be less than, or equal to, the number of files in the dump file set 。
在 expdp 中, parallel 参数值应小于等于 dump 文件数。默认情况下,假设在导出的时候指定 parallel=3, 那么则会产生三个 dump 文件。所以在考虑 parallel 参数的设置的时候,可以优先考虑需要导出几个文件最合适。
如果 prarallel 值设置过高,则有可能报 ORA-39095 error 。
eg:$ expdp scott/tiger directroy=dump_dir dumpfile=scott_%U.dmp parallel=4 filesize=10m
2. I mpdp 中的 parallel 参数
P arallel 在 impdp 中的参数与 expdp 中有所不同。
摘抄官方文档一句话: If the source of the import is a dump file set consisting of files, then multiple processes can read from the same file, but performance may be limited by I/O contention.
该意为:在 impdp 中, parallel 参数可以在一个文件或者多个文件中均可以使用,但是 parallel 参数不是越大越好,同样会受到 I/O 的限制。
eg:$ impdp scott/tiger directroy=dump_dir dumpfile=scott_%U.dmp parallel=4
-------------------- end ---------------------
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31529886/viewspace-2644698/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31529886/viewspace-2644698/