darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
978 stars 341 forks source link

Add option control the "prefetch" used by oracle_fdw COPY/INSERT #1748

Closed nasmart closed 3 months ago

nasmart commented 3 months ago

Prior to this change Ora2Pg uses the default "prefetch" of oracle_fdw, which at the time of writing is 50. Allowing this to be controlled by an Ora2Pg configuration/option gives the option of increased performance at the cost of some additional memory on the PostgreSQL side.

In my testing I've seen a 2x speed improvement when setting prefetch to 1000.

Hopefully, my commit covers all the required changes to add a new option. If not, please let me know what is outstanding.

darold commented 3 months ago

Thanks!