Re: [JDBC] Prepared statement performance... - Mailing list pgsql-general

From Maarten.Boekhold@reuters.com
Subject Re: [JDBC] Prepared statement performance...
Date
Msg-id T5d9c8cdad1c407b70772c@reuters.com
Whole thread Raw
List pgsql-general
On 09/27/2002 10:43:47 PM Barry Lind wrote:
> I think the real question here is when does it make sense to use server
> side prepared statements.  In the little bit of testing I have done, I
> would say the answer is rarely.  You need many factors to come into
> place for it to make sense to use server side prepared statements:
>
> 1) The statement needs to be big and complex such that there is
> significant overhead in the parsing and planning stages of execution.

Hmm, don't know how this relates to PostgreSQL, but I've got an example to the contrary with Oracle (8.1.6).

A collegue of mine is developing an application-specific dataloader which does a lot of simple select/update/insert
statements.When he changed the (java/JDBC) code from using Statement to PreparedStatement, he got an instant 60%
increasein performance. 

Maarten


------------------------------------------------------------- ---
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [SQL] function return multiply rows
Next
From: Martijn van Oosterhout
Date:
Subject: Re: query speed depends on lifetime of frozen db?