The Postgres command of choice to load bulk data is COPY https://www.postgresql.org/docs/current/static/sql-copy.html is much faster than anything else. It’s likely that the slowest part could be Oracle exporting it’s data. Try to use sqlplus to export the data and see how long does it take, you won’t be able to make the process faster than Oracle can export it’s data. If it’s fast enough, format the resulting file in a suitable format for Postgres ‘COPY FROM’ command. Finally you can pipe the Oracle export command and the Postgres COPY FROM command, so the process can run twice as fast. You can make it even faster if you divide the exported data by any criteria and run those export | import scripts in parallel.
|