pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Jie Liang <jie@stbernard.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepare Statement
Date: Thu, 17 Jun 2004 13:59:28 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0406171356320.14006@leary.csoft.net> (raw)
In-Reply-To: <E7E213858379814A9AE48CA6754F5ECB034518F9@mail01.stbernard.com>
References: <E7E213858379814A9AE48CA6754F5ECB034518F9@mail01.stbernard.com>



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 individualy execute five SELECTs ??? 
> 

This is what I see in the log file:

2004-06-17 11:55:35 [23254] LOG:  statement: PREPARE JDBC_STATEMENT_1(integer) AS SELECT  $1 ; EXECUTE JDBC_STATEMENT_1(1)
2004-06-17 11:55:35 [23254] LOG:  statement: EXECUTE JDBC_STATEMENT_1(2)
2004-06-17 11:55:35 [23254] LOG:  statement: EXECUTE JDBC_STATEMENT_1(3)
2004-06-17 11:55:35 [23254] LOG:  statement: EXECUTE JDBC_STATEMENT_1(4)
2004-06-17 11:55:35 [23254] LOG:  statement: EXECUTE JDBC_STATEMENT_1(5)
2004-06-17 11:55:35 [23254] LOG:  statement: DEALLOCATE JDBC_STATEMENT_1

I don't know why this would be different for you.  What exact version of 
the server and driver are you using?

Kris Jurka




view thread (19+ messages)  latest in thread

Message-ID: <Pine.BSO.4.56.0406171356320.14006@leary.csoft.net>
Permalink:  ../Pine.BSO.4.56.0406171356320.14006@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.56.0406171356320.14006@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: books@ejurka.com, jie@stbernard.com, tgl@sss.pgh.pa.us, pgsql-jdbc@postgresql.org
  Subject: Re: Prepare Statement
  In-Reply-To: <Pine.BSO.4.56.0406171356320.14006@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox