I need to insert 10 million records via Dblink into my database.
Do the normal insert statement insert into select * from would be the right or optimal way?
What other option could there be to insert data of this volume?
I am using Oracle 11g.
I need to insert 10 million records via Dblink into my database.
Do the normal insert statement insert into select * from would be the right or optimal way?
What other option could there be to insert data of this volume?
I am using Oracle 11g.
For 10 million Records we can use EXPDP/IMPDP also be cautious that we cannot copy data for partitioned tables across dblinks ( we need to create temp non partition table load data locally and then copy over database link)
Thanks, Kalyan
To find optimal way (using DBLINK) you must define your optimization criteria...
Simple first estimate the required time of the insert. Test with 10.000 rows and multiply the time with 1.000 - you'll get approximation of the whole statement duration. If the time is acceptable, you're done.
If not, calculate the reached transfer rate MB/sec and compare it with your network througput. You will see if there is improvement possible.
Next option is direct path insert - use APPEND hint (on the target side) and select via link from the remote side.
If this imporvement isn't enough (and you have still theoretical improvement), the last resort is parallel insert. Unfortunatelly this not possible ti do via PARALLEL hint and you must open N inserts to N temporary tables or N partitions of an temporary table.
You see that getting speed cost some effort, so you must find your own optimum...
I do not go much in detail as for each option its easy to find additional information.