Re: When extended query protocol ends? - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: When extended query protocol ends?
Date
Msg-id CAGECzQSKPkKVEcjZYd_TXcbH2ZeDL1hDFUWmPkneFmqAXfAQZQ@mail.gmail.com
Whole thread Raw
In response to Re: When extended query protocol ends?  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: When extended query protocol ends?
List pgsql-hackers
On Wed, 21 Feb 2024 at 17:07, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
> From many measurements we know that insert into table(id, name) values(?,?),(?,?),(?,?) is much more efficient than
> sending individual bind-exec-bind-exec-bind-exec-sync messages like "insert into table(id, name) values(?,?)"
> For instance, here are some measurements: https://www.baeldung.com/spring-jdbc-batch-inserts#performance-comparisons
> Based on that measurements I assume there's a non-trivial per-message overhead.

That's quite a different case. When splitting a multi insert statement
you're going to duplicate some work, e.g. executor initialization and
possibly even planning. But when replacing one Query packet with
Parse-Bind-Exec-Sync, these 4 packets are not duplicating such
expensive work. The only thing they should be doing extra is a bit of
packet parsing, which is very cheap.



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Test to dump and restore objects left behind by regression
Next
From: Peter Eisentraut
Date:
Subject: Re: Test to dump and restore objects left behind by regression