Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 71ECB1337B5A for ; Sun, 3 Oct 2010 21:28:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 81295-05 for ; Mon, 4 Oct 2010 00:27:59 +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 D93611337B48 for ; Sun, 3 Oct 2010 21:27:56 -0300 (ADT) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.2]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P2YuF-0002Bz-Dy; Mon, 04 Oct 2010 13:27:51 +1300 Message-ID: <4CA91F81.4050505@opencloud.com> Date: Mon, 04 Oct 2010 13:27:45 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Boris CC: pgsql-jdbc@postgresql.org Subject: Re: Upgrading JDBC driver from 7.3 to 8.4 affected execution plans References: <9c7afd41-61f0-4acb-bc14-bb10aeaf395f@d17g2000yqm.googlegroups.com> In-Reply-To: <9c7afd41-61f0-4acb-bc14-bb10aeaf395f@d17g2000yqm.googlegroups.com> X-Enigmail-Version: 0.95.7 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=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/33 X-Sequence-Number: 21001 Boris wrote: > Another interesting point is that, when I paste the slow query into > psql, and explain/analyze it, bad plan is chosen (like observed from > the code with new driver). > > Any ideas? I'd be happy to provide more details if needed. Is the > issue somehow caused by the fact that 8.4 driver uses real server side > prepared statements vs the old one that didn't? If you get the same problem via psql, I doubt it's related to your driver changes. What changed on the server side? -O