Does plperl catch the plan also?
Thanks.
Jie Liang
-Original Message-
From: Kris Jurka [mailto:[EMAIL PROTECTED]
Sent: Friday, June 18, 2004 2:47 PM
To: Jie Liang
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [JDBC] Prepare Statement
On Fri, 18 Jun 2004, Jie Liang wrote:
>
On Fri, 18 Jun 2004, Jie Liang wrote:
> So, I think that PreparedStatement should have a way at least case a
> String to an Array or a way to create a Array, because of
> conn.prepareStatement("SELECT myfunction('{1,2,3}')") is NOT very
> useful.
Right, this is a known issue. It's on the list.
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, b
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
On Thu, 17 Jun 2004, Jie Liang wrote:
> Kris,
> You are right, I modified that piece of code a little bit,
> CallableStatement stmt = conn.prepareCall("{?=call chr(?)}");
> Then my log file were:
> Select * from chr(65) as result;
> Select * from chr(66) as result;
> ..
> However, if I use:
On Thu, 17 Jun 2004, Jie Liang wrote:
> Kris,
> I have another question, I saw some discussion regarding
> PreparedStatement work with array argument, I get a error when I try to
> play with it.
> E.g.
> I have myfunction(int[]),
> So,
> PrepareStatement st = conn.prepareStatment("SELECT myfunc
On Thu, 17 Jun 2004, Jie Liang wrote:
> Kirs,
>
> I re-compile with setUseServerPrepare(true), it works fine, thanks.
> However, reading from my log file, what I saw is that five same SELECTs
> with different argument, so I am wondering that the PrepareStatement
> really save time than individu
On Wed, 16 Jun 2004, Jie Liang wrote:
> Kris,
> Thank you for your valuable response, I used the code you list
> following:
>
> [7.5 code example]
>
> Then, the compiler complaint:
> ServerSidePreparedStatement.java:20: cannot resolve symbol symbol :
> method setPrepareThreshold (int)
> locati
On Mon, 14 Jun 2004, Jie Liang wrote:
> I have a question about performance, in SQL commands: there is a
> prepare/execute command, document says it will improve the performance
> while repeatly execute a statement. In java.sql: there is a
> PreparedStatement object, which can store precompiled
So, I think that PreparedStatement should have a way at least case a
String to an Array or a way to create a Array, because of
conn.prepareStatement("SELECT myfunction('{1,2,3}')") is NOT very
useful.
Comment?
Jie Liang
-Original Message-
From: Kris Jurka [mailto:[EMAIL PROTECTED]
Sen
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
Kris,
I have another question, I saw some discussion regarding
PreparedStatement work with array argument, I get a error when I try to
play with it.
E.g.
I have myfunction(int[]),
So,
PrepareStatement st = conn.prepareStatment("SELECT myfunction(?)");
String arr="{1,2,3}";
St.setString(1,arr};
Res
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.
Thanks.
Jie Liang
-Original Message-
From: Kris Jurka [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 17, 2004 3:26 PM
To: Jie Liang
Cc: Tom Lane; [EMAIL PROTECTED]; [
Kris,
You are right, I modified that piece of code a little bit,
CallableStatement stmt = conn.prepareCall("{?=call chr(?)}");
Then my log file were:
Select * from chr(65) as result;
Select * from chr(66) as result;
..
However, if I use:
PrepareStatement stmt = conn.prepareStatement("SELECT chr
Kirs,
I re-compile with setUseServerPrepare(true), it works fine, thanks.
However, reading from my log file, what I saw is that five same SELECTs
with different argument, so I am wondering that the PrepareStatement
really save time than individualy execute five SELECTs ???
If I use one "parepare
Kris,
Thank you for your valuable response, I used the code you list
following:
import java.sql.*;
public class ServerSidePreparedStatement
{
public static void main(String args[]) throws Exception
{
Class.forName("org.postgresql.Driver");
String ur
16 matches
Mail list logo