Re: Batch insert in CTAS/MatView code

Поиск
Список
Период
Сортировка
От Paul Guo
Тема Re: Batch insert in CTAS/MatView code
Дата
Msg-id CAEET0ZEKrYucm-3mafMwfiV5+o=kDy7rf37JJkKjOco=4bzQKQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Batch insert in CTAS/MatView code  (David Fetter <david@fetter.org>)
Список pgsql-hackers


On Mon, Mar 11, 2019 at 2:58 AM David Fetter <david@fetter.org> wrote:
On Wed, Mar 06, 2019 at 10:06:27PM +0800, Paul Guo wrote:
> Hello, Postgres hackers,
>
> The copy code has used batch insert with function heap_multi_insert() to
> speed up. It seems that Create Table As or Materialized View could leverage
> that code also to boost the performance also. Attached is a patch to
> implement that.

This is great!

Is this optimization doable for multi-row INSERTs, either with tuples
spelled out in the body of the query or in constructs like INSERT ...
SELECT ...?

Yes. That's "batch insert" in the ModifyTable nodes which I mentioned in the first email.
By the way, batch is a usual optimization mechanism for iteration kind model (like postgres executor),
so batch should benefit many executor nodes in theory also.
 

Best,
David.
--
David Fetter <david(at)fetter(dot)org> https://urldefense.proofpoint.com/v2/url?u=http-3A__fetter.org_&d=DwIBAg&c=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw&r=Usi0ex6Ch92MsB5QQDgYFw&m=wgGDTDFzZV7nnMm0NFt-yGKmm_KZk18RXKP9HL8h6UE&s=tnaoLdajjR0Ew-93XUliHW1FUspVl09pIFd9aXxvqc8&e=
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Add support for hyperbolic functions, as well as log10().
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: WIP: Avoid creation of the free space map for small tables