Re: foreign table batch inserts

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: foreign table batch inserts
Дата
Msg-id CAB7nPqRt7xtUaX0s3XXGELdtTEFn7xME=fdAFcaBCo80quBroA@mail.gmail.com
обсуждение исходный текст
Ответ на foreign table batch inserts  (Manuel Kniep <m.kniep@web.de>)
Ответы Re: foreign table batch inserts  (Craig Ringer <craig@2ndquadrant.com>)
Re: foreign table batch inserts  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers
On Wed, May 18, 2016 at 6:00 AM, Manuel Kniep <m.kniep@web.de> wrote:
> I realized that inserts into foreign tables are only done row by row.
> Consider copying data from one local table to a foreign table with
>
> INSERT INTO foreign_table(a,b,c) SELECT a,b,c FROM local_table;
>
> When the foreign  server is for example in another datacenter with long latency,
> this as an enormous performance trade off.
>
> Wouldn’t it make sense to do the insert batch wise e.g. 100 rows ?

Using a single query string with multiple values, perhaps, but after
that comes into consideration query string limit particularly for
large text values... The query used for the insertion is a prepared
statement since writable queries are supported in 9.3, which makes the
code quite simple actually.

> Are there any plans doing that or am I miss something?

Not that I know of. I am adding Fujita-san in the loop here, he is
quite involved with postgres_fdw these days so perhaps he has some
input to offer.
--
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Allocate all page images at once in generic wal interface
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Parallel query and temp_file_limit