Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 518E61337B53 for ; Wed, 6 Oct 2010 09:20:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 84625-01 for ; Wed, 6 Oct 2010 12:20:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id D150F13364DE for ; Wed, 6 Oct 2010 09:20:10 -0300 (ADT) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P3Sya-00027p-NV; Thu, 07 Oct 2010 01:20:04 +1300 Message-ID: <4CAC696F.9020109@opencloud.com> Date: Thu, 07 Oct 2010 01:19:59 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: louis CC: pgsql-jdbc@postgresql.org Subject: Re: The logic behind the prepared statement in PostgreSQL References: <1286365302.13691.35.camel@london> In-Reply-To: <1286365302.13691.35.camel@london> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/55 X-Sequence-Number: 21023 louis wrote: > 1. Even though all the prepare statements have the identical SQL string, the postgresql server creates one execution plan for each statement. > So I think the execution plan is fetched by name (S_1, S_2, etc.) instead of SQL query string from the server-side. On the other hand, > a JDBC code tracing shows that the execution plan is fetched by SQL query String. Is the above assertion correct?