Re: POC: postgres_fdw insert batching

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: POC: postgres_fdw insert batching
Дата
Msg-id 20200712001101.x65f3hvsanvamtgj@development
обсуждение исходный текст
Ответ на Re: POC: postgres_fdw insert batching  ("Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>)
Ответы RE: POC: postgres_fdw insert batching  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Список pgsql-hackers
On Fri, Jul 10, 2020 at 09:28:44AM +0500, Andrey V. Lepikhov wrote:
>On 6/28/20 8:10 PM, Tomas Vondra wrote:
>>Now, the primary reason why the performance degrades like this is that
>>while FDW has batching for SELECT queries (i.e. we read larger chunks of
>>data from the cursors), we don't have that for INSERTs (or other DML).
>>Every time you insert a row, it has to go all the way down into the
>>partition synchronously.
>
>You added new fields into the PgFdwModifyState struct. Why you didn't 
>reused ResultRelInfo::ri_CopyMultiInsertBuffer field and 
>CopyMultiInsertBuffer machinery as storage for incoming tuples?
>

Because I was focused on speeding-up inserts, and that is not using
CopyMultiInsertBuffer I think. I agree the way the tuples are stored
may be improved, of course.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk
Следующее
От: Jaka Jančar
Дата:
Сообщение: StartupMessage parameters - free-form or not?