According to Oracle's documentation, the data pump in different ways to export imports, performance can be significantly different, this time just have the opportunity to test, migration table space, direct path, external table, and database chain export, import performance differences.
First check that the table space of the source database satisfies the self contained condition:
Sql> EXEC Dbms_tts. Transport_set_check (' tjsq,tjsq_tmp ')
Pl/sql procedure successfully completed.
Sql> SELECT * from Transport_set_violations;
No rows selected
To set the source database migration table space to read-only state:
sql> ALTER tablespace tjsq READ only;
Tablespace altered.
sql> ALTER tablespace tjsq_tmp READ only;
Tablespace altered.
The following export operations are performed using data pumps for tablespace migration:
Sql> HOST
[Oracle@yans2 ~]$ EXPDP system DIRECTORY=D_DMPDP DUMPFILE=TJSQ_090617_TRANS_TABLESPACE.DP transport_tablespaces=tjsq , tjsq_tmp
Export:release10.2.0.3.0-64bit Production on Wednesday June, 2009 18:07:29
Copyright (c) 2003, +, Oracle. All rights reserved.
Password:
Connected to:oracle database10genterprise Edition release10.2.0.3.0-64bit Production
With the partitioning, OLAP and Data Mining options
Starting "SYSTEM". " Sys_export_transportable_01 ": system/******** DIRECTORY=D_DMPDP DUMPFILE=TJSQ_090617_TRANS_TABLESPACE.DP Transport _TABLESPACES=TJSQ, Tjsq_tmp
Processing Object Type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing Object Type Transportable_export/table
Processing Object Type Transportable_export/grant/owner_grant/object_grant
Processing Object Type Transportable_export/index
Processing Object Type Transportable_export/constraint/constraint
Processing Object Type Transportable_export/index_statistics
Processing Object Type Transportable_export/comment
Processing Object Type Transportable_export/constraint/ref_constraint
Processing Object Type Transportable_export/table_statistics
Processing Object Type Transportable_export/post_table_action
Processing Object Type Transportable_export/materialized_view_log
Processing Object Type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYSTEM". " Sys_export_transportable_01 "Successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM. SYS_EXPORT_TRANSPORTABLE_01 is:
/data/dmp/tjsq_090617_trans_tablespace.dp
Job "SYSTEM". " Sys_export_transportable_01 "successfully completed at 18:08:30
You can see that because you don't need to export the data in the table, the export operation is done very quickly, with only 1 minutes and 1 seconds.
The following are delivered using the Dbms_file_transfer package:
Sql> SET TIMING on
Sql> EXEC Dbms_file_transfer. Get_file (' D_datafile ', ' tjsq01.dbf ', ' Newdemo ', ' d_datafile ', ' tjsq01.dbf ')
Pl/sql procedure successfully completed.
elapsed:00:30:57.84
Sql> EXEC Dbms_file_transfer. Get_file (' D_datafile ', ' tjsq02.dbf ', ' Newdemo ', ' d_datafile ', ' tjsq02.dbf ')
Pl/sql procedure successfully completed.
elapsed:00:06:29.41
Sql> EXEC Dbms_file_transfer. Get_file (' D_datafile ', ' tjsq_tmp.dbf ', ' Newdemo ', ' d_datafile ', ' tjsq_tmp.dbf ')
Pl/sql procedure successfully completed.
elapsed:00:06:28.63
Sql> EXEC Dbms_file_transfer. Get_file (' D_DMPDP ', ' tjsq_090617_trans_tablespace.dp ', ' Newdemo ', ' d_dmp ', ' TJSQ_TRANS_TABLESPACE.DP ')
Pl/sql procedure successfully completed.