Tom Lane <[EMAIL PROTECTED]> wrote:

> ITAGAKI Takahiro <[EMAIL PROTECTED]> writes:
> >   [V2]  PQsendQuery (V2; original)
> >   [V3]  PQsendQueryParams (V3)
> >   [V3P] PQsendQueryPrepared (V3 with prepared statements)
> > V3 was 12% slower than V2, and V3P was 40% faster than V2.
> Those aren't really comparable, because the functionality is different.
> Did you check plain PQSendQuery on both V2 and V3?

Oops, I called 'simple query' V2. All of my tests used V3 protocol.
The results need to be read as:

PQsendQuery = (simple query)
PQsendQueryParams = (parse + bind + describe + execute + sync)

If the latter is slower than the former, the another version of
PQsendQueryParams, that fills parameters into SQL and uses simple-query,
might be considerable for performance. For example in Java, using
PreparedStatement class with V2 protocol.

ITAGAKI Takahiro
NTT Open Source Software Center

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to