Re: Transient plans versus the SPI API - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Transient plans versus the SPI API
Date
Msg-id CA+U5nM+fX=i82+29aT2S=ZvJfAiQua=7oDcwhxtWhw95PVKpMA@mail.gmail.com
Whole thread Raw
In response to Re: Transient plans versus the SPI API  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On Sat, Aug 6, 2011 at 7:29 PM, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
> Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: cataloguing NOT NULL constraints
Next
From: PostgreSQL - Hans-Jürgen Schönig
Date:
Subject: Re: Will switchover still need a checkpoint in 9.1 SR Hot Standby