Re: [JDBC] Prepared statement performance...

From: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Prepared statement performance...
Date: 2002-09-30 10:19:41
Message-ID: 3D98253D.3040209@oli.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2002-09-30 12:29:26 Re: [SQL] arrays
Previous Message Martijn van Oosterhout 2002-09-30 09:55:26 Re: current_timestamp after queries

Browse pgsql-jdbc by date

  From Date Subject
Next Message Felipe Schnack 2002-09-30 13:09:15 limiting rows in an query
Previous Message Jeroen Olthof 2002-09-30 08:09:55 getObject