Re: [HACKERS] Insert values() per-statement overhead

Поиск
Список
Период
Сортировка
От Vladimir Sitnikov
Тема Re: [HACKERS] Insert values() per-statement overhead
Дата
Msg-id CAB=Je-Gps4Kiu-2tXqAHSrtt4mAU6PQaC0E1ocVmgVHrieGYYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Insert values() per-statement overhead  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-hackers
Andres>I think the biggestoverhead here is that the executor startup includes
Andres>too many indirect (linked lists) datastructured, that allocated each
Andres>round

The case is very common: batch inserts are popular in Java, and ORMs use batch API automatically.
However, there's high per-backend-message overhead, and that overhead is very noticeable.

What is the approach to handle this?

Folding multiple DML statements into one with a help of CTE does not work either (see https://github.com/pgjdbc/pgjdbc/issues/1165 ):

CTE doc>Trying to update the same row twice in a single statement is not supported. Only one of the modifications takes place, but it is not easy (and sometimes not possible) to reliably predict which one

Vladimir

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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: bulk typos
Следующее
От: David Fetter
Дата:
Сообщение: Re: Diagonal storage model