Re: Query preparation
От | Tom Lane |
---|---|
Тема | Re: Query preparation |
Дата | |
Msg-id | 18961.1239742344@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Query preparation (John Lister <john.lister-ps@kickstone.com>) |
Ответы |
Re: Query preparation
|
Список | pgsql-jdbc |
John Lister <john.lister-ps@kickstone.com> writes: > Oliver Jowett wrote: >> It would be an extra network round-trip on every query, and there's no >> requirement to prepare it early. >> > Just going through the code again and please correct me if i'm wrong, > but at the moment there is unnecessary network traffic/latency. Assuming > a PreparedStatement, every time execute is called, sendParse and > sendDescribePortal are called (the former checks if a server side > prepared statement has been created and aborts if so). Admittedly > sendParse is only called as many times as setPrepareThreshold is set to > (which admittedly may be as low as 1) I think you're missing the cue that those are "send" operations. They don't wait for a response to come back. In fact, assuming that the JDBC driver is implemented the way I think, the actual data for both messages is expected to go out as a single network packet after the driver reaches the point of expecting a response. regards, tom lane
В списке pgsql-jdbc по дате отправления: