Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6DEEC9FB619 for ; Mon, 26 Feb 2007 12:12:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 90212-02 for ; Mon, 26 Feb 2007 12:12:55 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by postgresql.org (Postfix) with ESMTP id 093B09FB737 for ; Mon, 26 Feb 2007 12:12:54 -0400 (AST) Received: by an-out-0708.google.com with SMTP id c24so856580ana for ; Mon, 26 Feb 2007 08:12:54 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=q0TfmbEAI/MAE7pNkRgAz+6XheLheD3idZgL1s3w+w3ImkLceyjjpzYWQTim0RvWBkCb0wPWRNsujUMc6yaRfiq2dKTQ56AOIDiI9UuXFx0ucMwNHH2+PprnKuKiS9Bb0P4CvxsMKXozBXmAH0be0cGK8ro1eG1KRRXYaPrZvFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Qv9hej5dhyOKTwagq4zd3H38yzSuqIxaHNlT0Rz1VxAM7Xrxl2WnhcvfQZylx5SQinCy4BTxiJ9TFXVXIkA8qkznp+acF2cVnVRbp6gPt34T9N/vezhTU9dDvNDZOKa46MCdPYH7N19p+HJz2pZSrmllL5yX/b5xFFPrz0VDbgo= Received: by 10.114.155.1 with SMTP id c1mr1386686wae.1172506373254; Mon, 26 Feb 2007 08:12:53 -0800 (PST) Received: by 10.114.198.6 with HTTP; Mon, 26 Feb 2007 08:12:53 -0800 (PST) Message-ID: <430d92a20702260812le88fb59w3ec40089db7b54dd@mail.gmail.com> Date: Mon, 26 Feb 2007 11:12:53 -0500 From: Gene Reply-To: gene@sotech.us To: pgsql-jdbc@postgresql.org, pgsql-performance@postgresql.org Subject: does prepareThreshold work? forced to use old driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=BAYES_50, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/127 X-Sequence-Number: 16683 hi! I've been having some serious performance issues with postgresql8.2/hibernate/jdbc due to postgres reusing bad cached query plans. It doesn't look at the parameter values and therefore does not use any partial indexes. After trying to set prepareThreshold=0 in the connection string which didnt work, even modifying the jdbc driver and forcing it to 0 and not working I realized that it must be being ignored. After giving up pretty much I tried a much older driver which doesn't use server prepared statements at all the problem has gone away and it is once again using the partial indexes. How can I get this to work properly on the new jdbc driver? I don't really like having to use a 2 year old driver to get good performance as you can imagine :) Could someone point me to a jdbc src file where I could just disable server-side prepared statements entirely? -- thanks, G