pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andy Lester <andy@petdance.com>
Cc: Craig Ringer <ringerc@ringerc.id.au>
Cc: Royce Ausburn <royce.ml@inomial.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Prepared statements and suboptimal plans
Date: Tue, 20 Sep 2011 21:00:32 -0400
Message-ID: <10687.1316566832@sss.pgh.pa.us> (raw)
In-Reply-To: <7B0A863F-F304-4057-807B-9B2E6137E107@petdance.com>
References: <C38A9B65-3AEB-4AFC-AE49-8D61B2DEDF64@inomial.com>
	<4E792417.5080205@ringerc.id.au>
	<9289.1316565395@sss.pgh.pa.us>
	<7B0A863F-F304-4057-807B-9B2E6137E107@petdance.com>

Andy Lester <andy@petdance.com> writes:
> On Sep 20, 2011, at 7:36 PM, Tom Lane wrote:
>> 9.2, sorry, not 9.1.  We could use some motivated people testing that
>> aspect of GIT HEAD, though, since I doubt the policy for when to re-plan
>> is quite ideal yet.

> Is motivation and a box enough?  I have motivation, but not knowledge of internals enough to drive testing myself.

Well, you probably don't need much internals knowledge as long as you
can read a little C.  The crux of what I'm worried about is
choose_custom_plan() in src/backend/utils/cache/plancache.c, which is
really pretty simple: decide whether to use a custom (parameter-aware)
plan or a generic (not-parameter-aware) plan.  You might want to shove
some elog() calls in there for tracing purposes so that you can log what
it did, but then it's just a matter of throwing real-world workloads at
it and seeing if it makes good decisions.

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <10687.1316566832@sss.pgh.pa.us>
Permalink:  ../10687.1316566832@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10687.1316566832@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andy@petdance.com, ringerc@ringerc.id.au, royce.ml@inomial.com
  Subject: Re: Prepared statements and suboptimal plans
  In-Reply-To: <10687.1316566832@sss.pgh.pa.us>

* 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