From: Kris Jurka <books@ejurka.com>
To: gene@sotech.us
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: does prepareThreshold work? forced to use old driver
Date: Mon, 26 Feb 2007 11:45:24 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0702261129290.6591@leary.csoft.net> (raw)
In-Reply-To: <430d92a20702260812le88fb59w3ec40089db7b54dd@mail.gmail.com>
References: <430d92a20702260812le88fb59w3ec40089db7b54dd@mail.gmail.com>
On Mon, 26 Feb 2007, Gene wrote:
> 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 :)
Something must be going wrong in the setting to zero or your code may be
setting it to non-zero at some later point. I believe prepareThreshold=0
should work. Do you have a test case showing it doesn't?
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: books@ejurka.com, gene@sotech.us, pgsql-jdbc@postgresql.org
Subject: Re: does prepareThreshold work? forced to use old driver
In-Reply-To: <Pine.BSO.4.64.0702261129290.6591@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox