Re: Taking advantage of prepared statement performance

From: Barry Lind <barry(at)xythos(dot)com>
To: brettonator(at)excite(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Taking advantage of prepared statement performance
Date: 2002-10-10 17:48:02
Message-ID: 3DA5BD52.2080705@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Brett,

It might help performance. I would suggest testing it out and comparing
the results with and without server side prepared statements (I am
assuming you are attempting to use server side prepared statements, if
not then you shouldn't see any difference in performance). Then report
back to the list your findings, as I am sure there are many here that
would be insterested in knowing the results.

--Barry

Brett wrote:
>
> Correction... version is 7.3b2
>
>
> --- On Thu 10/10, Brett < brettonator(at)excite(dot)com > wrote:
>
> *From: *Brett [mailto: brettonator(at)excite(dot)com]
> *To: *pgsql-jdbc(at)postgresql(dot)org
> *Date: *Thu, 10 Oct 2002 13:30:00 -0400 (EDT)
> *Subject: *[JDBC] Taking advantage of prepared statement performance
>
>
>
>
>
>
> I have a web application that invokes java jdbc code for each
> request. Would
> it be faster if I stored all my prepared statements for each
> connection, so
> when I want to do a query I a) pull a connection object from the
> pool then
> b) call ps.setX; ps.setY;...; ps.executeQuery(); and not close the
> prepared
> statement? That way, another thread could grab the connection and not
> have to recreate the prepared statement. I would associate sets of
> prepared statements with connections. Would this be faster than
> creating a prepared statement for each web request?
>
> I am using 7.1.3b2 (for production *crosses fingers*) in case that
> matters.
>
> Once again thanks for any help and sorry for any formatting issues with
> this message.
>
>
>
> ------------------------------------------------------------------------
> *Join Excite! - http://www.excite.com*
> The most personalized portal on the Web!

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nic Ferrier 2002-10-10 18:24:06 Re: Getting a ResultSet for a refcursor element.
Previous Message Brett 2002-10-10 17:34:03 Re: Taking advantage of prepared statement performance