Re: Optimizing prepared statements

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizing prepared statements
Date: 2006-09-04 09:41:25
Message-ID: 20060904094125.GB16894@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 04, 2006 at 11:12:13AM +0700, Jeroen T. Vermeulen wrote:
> As I've said before, all this falls down if there is a significant cost to
> keeping one or two extra plans per prepared statement. You mentioned
> something about "tracking" plans. I don't know what that means, but it
> sounded like it might impose a runtime cost on keeping plans around.

I think what he meant is tracking plans during the planning process.
Currently at the end of each step you weed out all the plans that arn't
the best for each path-key. To track multiple results at that stage
would be expensive.

However, just running the planner over the same query multiple times
with different estimates shouldn't be too expensive to store.

However, you're discussing the process of replanning based on changes
in variables. At the moment we really need to work on replanning
generally, it isn't done at all currently...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2006-09-04 10:05:34 Re: @ versus ~, redux
Previous Message Carlo Florendo 2006-09-04 08:24:52 Re: Getting a move on for 8.2 beta