Re: Transient plans versus the SPI API

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Transient plans versus the SPI API
Date: 2011-08-07 11:24:10
Message-ID: CA+U5nM+fX=i82+29aT2S=ZvJfAiQua=7oDcwhxtWhw95PVKpMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 6, 2011 at 7:29 PM, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> I think we'll be a lot better off with the framework discussed last
>> year: build a generic plan, as well as custom plans for the first few
>> sets of parameter values, and then observe whether there's a significant
>> reduction in estimated costs for the custom plans.
>
> Another way here would be to cache more than a single plan and to keep
> execution time samples or some other relevant runtime characteristics.
> Then what we need would be a way to switch from a plan to another at run
> time on some conditions, like realizing that the reason why the planner
> thought a nestloop would be perfect is obviously wrong, or maybe just
> based on runtime characteristics.

Tom and I discussed storing multiple sub-plans on a node back in '05
IIRC, and Tom later put in support for that.

That wasn't followed up on.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message PostgreSQL - Hans-Jürgen Schönig 2011-08-07 12:22:25 Re: Will switchover still need a checkpoint in 9.1 SR Hot Standby
Previous Message Peter Eisentraut 2011-08-07 09:43:52 Re: cataloguing NOT NULL constraints