From: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
---|---|
To: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com> |
Cc: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, davecramer(at)postgres(dot)rocks, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: When extended query protocol ends? |
Date: | 2024-02-22 09:01:36 |
Message-ID: | CAGECzQSKPkKVEcjZYd_TXcbH2ZeDL1hDFUWmPkneFmqAXfAQZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 21 Feb 2024 at 17:07, Vladimir Sitnikov
<sitnikov(dot)vladimir(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-02-22 09:16:50 | Re: Test to dump and restore objects left behind by regression |
Previous Message | Ashutosh Bapat | 2024-02-22 08:53:05 | Re: Test to dump and restore objects left behind by regression |