Re: Optimizing prepared statements - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Optimizing prepared statements
Date
Msg-id 20060904094125.GB16894@svana.org
Whole thread Raw
In response to Re: Optimizing prepared statements  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
List 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Matteo Beccati
Date:
Subject: Re: @ versus ~, redux
Next
From: Gregory Stark
Date:
Subject: Re: @ versus ~, redux