Re: [GENERAL] Prepared statement performance... - Mailing list pgsql-jdbc

From Jochem van Dieten
Subject Re: [GENERAL] Prepared statement performance...
Date
Msg-id 3D98253D.3040209@oli.tudelft.nl
Whole thread Raw
In response to Re: [GENERAL] Prepared statement performance...  (Barry Lind <barry@xythos.com>)
List pgsql-jdbc
Barry Lind wrote:
>
> Currently you probably can't.  But given the information I have
> mentioned in my previous mails in this thread, I am not sure that you
> would really want to unless you somehow have the ability to do it
> statement by statement since in most cases I think you don't want to use
> server side prepared statements.

OK, so I understand you see a difference between a JDBC PrepareStatement
and a server side prepared statement, and the first does not necessarily
imply the second. I don't see that difference per se :) If I don't want
to use a server side prepared statement I will make use of
CreateStatement. But I can imagine that for some applications that are a
bit more advanced as mine a more granular control is needed.

Would it be possible to have a parameter in the JDBC URL that would
switch the behaviour with regard to server side prepared statements?
Something like ?serverPrepare={always|statement|never} which defaults to
statement (i.e. the setUseServerPrepare() you are suggesting).

Jochem


pgsql-jdbc by date:

Previous
From: Chris Thompson
Date:
Subject: COPY FROM
Next
From: Felipe Schnack
Date:
Subject: limiting rows in an query