Re: Very strange performance decrease when reusing a PreparedStatement - Mailing list pgsql-jdbc

From Simon Riggs
Subject Re: Very strange performance decrease when reusing a PreparedStatement
Date
Msg-id 1241685951.6109.70.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Very strange performance decrease when reusing a PreparedStatement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
On Wed, 2009-05-06 at 18:39 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > We talked a few years back about an "Option node" that would select
> > sub-plans at runtime based upon the actual values of the bind variable.
> > Nobody's got around to doing anything with that yet.
>
> There is an AlternativeSubPlan mechanism in 8.4, though we're not doing
> very much with it yet.

OK, good. We just need to use it when the distribution of values is
highly non-uniform such that values with max and min selectivity can
generate different plans *and* we have a parameter, the arrival
distribution of which we have no way of knowing at plan time. That case
accounts for about 50% of the cases for which hints/special handling is
currently required.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Thread hangs in VisibleBufferedInputStream.readMore
Next
From: Oliver Hitz
Date:
Subject: Re: Thread hangs in VisibleBufferedInputStream.readMore