Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E9C7663329E for ; Sun, 3 May 2009 20:48:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 17795-09 for ; Sun, 3 May 2009 20:48:31 -0300 (ADT) 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 6BA56632BA4 for ; Sun, 3 May 2009 20:48:32 -0300 (ADT) Received: from 219-89-243-186.adsl.xtra.co.nz ([219.89.243.186] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1M0lQ1-0001OF-0n; Mon, 04 May 2009 11:48:25 +1200 Message-ID: <49FE2D45.2070308@opencloud.com> Date: Mon, 04 May 2009 11:48:21 +1200 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Tom Lane CC: John Lister , pgsql-jdbc@postgresql.org Subject: Re: Very strange performance decrease when reusing a PreparedStatement References: <5C2E1645-73B6-4509-96CD-FA77869516AB@noopsis.fr> <49F71EDD.2070200@opencloud.com> <02437794-A78D-449C-843F-B823195F9623@noopsis.fr> <491f66a50905030310j5b4cdcd8jbf4f6e757c2ba580@mail.gmail.com> <49FD7383.1010005@kickstone.com> <11395.1241361696@sss.pgh.pa.us> In-Reply-To: <11395.1241361696@sss.pgh.pa.us> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200905/28 X-Sequence-Number: 19578 Tom Lane wrote: > There are certainly cases where lack of parameter type information could > lead to a poor plan, but they are corner cases. I fear they are less of a corner case than you believe - they seem to pop up regularly here on the JDBC list. (This might be a reflection that applications using JDBC are often web-facing apps with simple, index-heavy queries) -O