pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Roland Roberts <roland@astrofoto.org>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Very strange performance decrease when reusing a PreparedStatement
Date: Thu, 07 May 2009 09:45:51 +0100
Message-ID: <1241685951.6109.70.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <29597.1241649548@sss.pgh.pa.us>
References: <5C2E1645-73B6-4509-96CD-FA77869516AB@noopsis.fr>
	<49F71EDD.2070200@opencloud.com>
	<02437794-A78D-449C-843F-B823195F9623@noopsis.fr>
	<fdeb32eb0905030122t665113e5nd34e7268d9ab1863@mail.gmail.com>
	<491f66a50905030310j5b4cdcd8jbf4f6e757c2ba580@mail.gmail.com>
	<fdeb32eb0905030928j4e72f1e3vbecb78d0cb74be58@mail.gmail.com>
	<49FDEB97.6050800@astrofoto.org>
	<1241647194.6109.52.camel@ebony.2ndQuadrant>
	<29597.1241649548@sss.pgh.pa.us>


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




view thread (26+ messages)

Message-ID: <1241685951.6109.70.camel@ebony.2ndQuadrant>
Permalink:  ../1241685951.6109.70.camel@ebony.2ndQuadrant/
Also on:    postgresql.org/message-id/1241685951.6109.70.camel@ebony.2ndQuadrant

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: simon@2ndQuadrant.com, tgl@sss.pgh.pa.us, roland@astrofoto.org
  Subject: Re: Very strange performance decrease when reusing a PreparedStatement
  In-Reply-To: <1241685951.6109.70.camel@ebony.2ndQuadrant>
  References: <5C2E1645-73B6-4509-96CD-FA77869516AB@noopsis.fr> <49F71EDD.2070200@opencloud.com> <02437794-A78D-449C-843F-B823195F9623@noopsis.fr> <fdeb32eb0905030122t665113e5nd34e7268d9ab1863@mail.gmail.com> <491f66a50905030310j5b4cdcd8jbf4f6e757c2ba580@mail.gmail.com> <fdeb32eb0905030928j4e72f1e3vbecb78d0cb74be58@mail.gmail.com> <49FDEB97.6050800@astrofoto.org> <1241647194.6109.52.camel@ebony.2ndQuadrant> <29597.1241649548@sss.pgh.pa.us> <1241685951.6109.70.camel@ebony.2ndQuadrant>

* 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