Re: Prepared statements considered harmful - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Prepared statements considered harmful
Date
Msg-id 87hczrippj.fsf@stark.enterprisedb.com
Whole thread Raw
In response to Re: Prepared statements considered harmful  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
Responses Re: Prepared statements considered harmful  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
Re: Prepared statements considered harmful  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-hackers
"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes:

> On Fri, September 1, 2006 16:53, Martijn van Oosterhout wrote:
>
>> Interesting thought. It might be worth trying. But my big question: is
>> all this testing and counting actually going to be faster than just
>> replanning? Postgresql's planner is not that slow.
>
> In the best case (which of course would have to be very frequent for any
> of this to matter in the first place) it's mainly just a short loop
> comparing the call's parameter values to their counterparts stored with
> the plan and update those two-bit confidence counters.  You wouldn't
> *believe* how simple you have to keep these things in processor
> architecture.  :-)

I think the slow part is trying to figure out whether to count the current
call as a hit or a miss. How do you determine whether the plan you're running
is the best plan without replanning the query?

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Luke Lonergan"
Date:
Subject: Re: Sort performance
Next
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: Prepared statements considered harmful