Thread: Re: [JDBC] Prepare Statement

Re: [JDBC] Prepare Statement

From
"Jie Liang"
Date:
Nope, I think you are right. The improvement of performance will be
minimal. Because that to parse "SELECT * FROM myfunction(?,?,?)" is very
very quick.
However, I am still thinking if I call one SELECT and one DELECT and one
UPDATE and one INSERT a thousand times against same table with different
arguments, should I consider performance iusse?

Secondly, I assume the function should be a pre-compiled object stored
on server side, doesn't it.

Thanks.


Jie Liang

-----Original Message-----
From: Kris Jurka [mailto:books@ejurka.com]
Sent: Thursday, June 17, 2004 10:51 PM
To: Jie Liang
Cc: pgsql-sql@postgresql.org; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Prepare Statement




On Thu, 17 Jun 2004, Jie Liang wrote:

> Hmm, intersting.
> I am using jdk 1.3.1, and pg74.213.jdbc2.jar driver, I hope this bug
> could be fixed in later version.
>

I suppose, but I'm going to put it pretty close to the bottom of my todo

list because it still works even though it doesn't use a server prepared

statement, and as I mentioned earlier the performance improvement if any

will be minimal.  Have you done any testing to show that you are even
getting a performance gain?

Kris Jurka

Re: [JDBC] Prepare Statement

From
Kris Jurka
Date:

On Fri, 18 Jun 2004, Jie Liang wrote:

> However, I am still thinking if I call one SELECT and one DELECT and one
> UPDATE and one INSERT a thousand times against same table with different
> arguments, should I consider performance iusse?

Right, this is a case where some benefits can be found, but remember the
premature optimization adage.

>
> Secondly, I assume the function should be a pre-compiled object stored
> on server side, doesn't it.
>

I depends on the language the function is written.  plpgsql caches plans,
but not all procedural languages do.

Kris Jurka