From: Niels Jespersen <NJN@dst.dk>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Possibilities for optimizing inserts across oracle_fdw foreign data wrapper
Date: Sun, 19 Sep 2021 10:28:48 +0000
Message-ID: <ae9ab150af5a417e985e581249107853@dst.dk> (raw)
Hello all
We are often using the oracle_fdw to transfer data between Postgres (version 11+) and Oracle (version 18+). It works great.
However I have a task at hand that requires inserting a few billion rows in an Oracle table from a Postgres query.
insert into t_ora (a,b,c)
select a,b,c from t_pg;
This is driven from a plpgsql stored procedure, if that matters.
I want to optimize the running time of this. But I am unsure of which, if any, possibilities there actually is.
Reducing the number of network roundtrips is usually a good way to increase throughput. But, how do I do that?
If I could make the Oracle insert direct load, that would usually also increase throughput. But, is that possible here. There are no constraints defined on the destinaton tables.
Regards Niels Jespersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: NJN@dst.dk
Subject: Re: Possibilities for optimizing inserts across oracle_fdw foreign data wrapper
In-Reply-To: <ae9ab150af5a417e985e581249107853@dst.dk>
References: <ae9ab150af5a417e985e581249107853@dst.dk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox