Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0F1A79FA4C5 for ; Mon, 25 Sep 2006 14:37:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 66210-02 for ; Mon, 25 Sep 2006 17:37:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 0440A9FA433 for ; Mon, 25 Sep 2006 14:37:05 -0300 (ADT) Received: (qmail 14765 invoked from network); 25 Sep 2006 17:37:05 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 25 Sep 2006 17:37:05 -0000 In-Reply-To: <275654F2AE237D438ACC1FE2697CD8C91EC2702C@nj7460exch008u.ho.lucent.com> References: <275654F2AE237D438ACC1FE2697CD8C91EC2702C@nj7460exch008u.ho.lucent.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/alternative; boundary=Apple-Mail-1-509997325 Message-Id: <5F8A6B12-8F85-4586-9E40-2C27C31C9048@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org From: Dave Cramer Subject: Re: Bind message Date: Mon, 25 Sep 2006 13:37:03 -0400 To: "Do, Leon" X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/99 X-Sequence-Number: 15817 --Apple-Mail-1-509997325 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi, The default is not to re-use statements, you have add prepareThreshold=n to the url where n is greater than 0. What this means is that after n times of use the prepared statement will be re- used.. see http://jdbc.postgresql.org/documentation/head/ connect.html#connection-parameters for more details Dave On 25-Sep-06, at 1:27 PM, Do, Leon wrote: > Hi All, > > From my understanding, when I create a prepare statement I can > execute it multiple times and to increase the efficiency. But > from what I seen from the logging, Postgres always send the same > message sequences over the wire. > parse, > bind, > describe, > execute > .... > parse, > bind, > describe > execute > > It should execute parse only one time right? > > If this is not the right forum then please let me know or direct me > to the right forum > > thanks > > Leon Do > > --Apple-Mail-1-509997325 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi,

The default is not to = re-use statements, you have add prepareThreshold=3Dn to the url where n = is greater than 0. What this means is that after n times of use the = prepared statement will be re-used..

see = http://jdbc.postgresql.org/documentation/head/connect.html#connection-para= meters for more details

Dave=A0
On = 25-Sep-06, at 1:27 PM, Do, Leon wrote:

=
Hi= All,
=A0
=46rom my = understanding, when I create a prepare statement I can execute it = multiple times=A0and to increase the=A0efficiency.=A0=A0 But from what I = seen from=A0the logging, Postgres always send the same message sequences = over the wire.
parse,
bind,
describe,
execute
....
parse,
bind,
describe
execute
=A0
It should = execute parse only one time=A0right?
=A0
If this is = not the right forum then please let me know or direct me to the right = forum
=A0
thanks
=A0
Leon = Do
=A0
=A0

= --Apple-Mail-1-509997325--