Oracle expdp比exp快的原理是什么?

发布时间:2019-03-07 00:00:00

Database Utilities

Data Performance Improvements for Data Pump Export and Import

The improved performance of the Data Pump Export and Import utilities is attributable to several factors, including the following:
Multiple worker processes can perform intertable and interpartition parallelism to load and unload tables in multiple, parallel, direct-path streams.
--多个进程并行和直接路径读
For very large tables and partitions, single worker processes can choose intrapartition parallelism through multiple parallel queries and parallel DML I/O server processes when the external tables method is used to access data.
Data Pump uses parallelism to build indexes and load package bodies.
--可以并行的建索引和包
Dump files are read and written directly by the server and, therefore, do not require any data movement to the client.
--在服务器上操作,不需要将数据返回给客户端,省去网络的环节
The dump file storage format is the internal stream format of the direct path API. This format is very similar to the format stored in Oracle database datafiles inside of tablespaces. Therefore, no client-side conversion to INSERT statement bind variables is performed.
--导出的数据文件是block格式,不是exp的SQL语句
The supported data access methods, direct path and external tables, are faster than conventional SQL. The direct path API provides the fastest single-stream performance. The external tables feature makes efficient use of the parallel queries and parallel DML capabilities of the Oracle database.
--支持直接路径读,比转换成SQL快
Metadata and data extraction can be overlapped during export.
--元数据和数据的提取可以同时执行


总结如下:

  1.expdp是服务端程序,exp是客户端程序,exp还需要网络传输,这个很影响速度。
  2.expdp读的就是数据块,exp是要转换成SQL。
  3.expdp可以并行导出数据、元数据和建索引、包,exp不行。
  4.expdp采用的是直接路径读,exp是要通过SGA。

<<