Re: pulling hair out trying to force replan

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: <gene(at)sotech(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: pulling hair out trying to force replan
Date: 2007-02-26 05:51:47
Message-ID: 0b6c01c7596a$34cfaf60$6400a8c0@dualcore
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I've got some pretty big tables with partial indexes
> on very specific values. It seems as though no matter
> what I try to force a replan it won't plan to use the
> partial indexes because it seems to be caching a plan
> valid for all potential parameters. I'm using hibernate
> which uses prepared statements over jdbc. I've tried
> setting prepareThreshold=0 to no avail.

> Any suggestions would be most appreciated, I've been
> trying to solve this for a week now :(

Not sure how much this will help you, but you can query
The pg_prepared_statements view to find the prepared
statement that's causing your headaches (S_127/C_128
in your example) and feed it to DEALLOCATE.

http://www.postgresql.org/docs/8.2/interactive/view-pg-prepared-statemen
ts.html

http://www.postgresql.org/docs/8.2/interactive/sql-deallocate.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karl O. Pinc 2007-02-26 07:39:43 Re: General Ledger db design
Previous Message Gene 2007-02-26 05:05:06 pulling hair out trying to force replan