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

From AgentM
Subject Re: Prepared statements considered harmful
Date
Msg-id E2FECC8E-E6EB-45B4-9076-58E40F790BF7@themactionfaction.com
Whole thread Raw
In response to Re: Prepared statements considered harmful  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-hackers
On Aug 31, 2006, at 8:52 , Csaba Nagy wrote:

>
> This of course would need a lot more preparation time than just  
> prepare
> one plan, but that's why you want to do it upfront and then cache the
> results. A central plan repository mentioned in other posts would fit
> nicely here... and you could use prepared plans for non-parameterized
> queries too by simply considering the constants as parameters, to
> increase the chances for a prepared plan reuse - this of course for
> complex enough queries.

If prepared statements become more expensive to create, then it would  
make more sense for them to persist across sessions. All of an  
application's prepared statements could be cached.

-M


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Updatable views
Next
From: Chris Browne
Date:
Subject: gBorg status?