From: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com> |
---|---|
To: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
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-21 16:07:20 |
Message-ID: | CAB=Je-Hi_48+7gea54bkiKXz6hCFYWj1_WD-3bApFXP=+JG1cw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>Would performance suffer that much?
I have not benchmarked it much, however, the driver sends "autosave"
queries once (savepoint) or twice(savepoint+release) for every
user-provided query.
If we use extended queries (parse+bind+exec) for every savepoint, that
would result in 3 or 6 messages overhead for every user query.
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.
Vladimir
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Wienhold | 2024-02-21 16:18:42 | Re: Patch: Add parse_type Function |
Previous Message | Jelte Fennema-Nio | 2024-02-21 15:50:03 | Re: When extended query protocol ends? |