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

From AgentM
Subject Re: Prepared statements considered harmful
Date
Msg-id 92531E2A-E8C6-4FF8-A437-C4A5198C3AA2@themactionfaction.com
Whole thread Raw
In response to Re: Prepared statements considered harmful  (mark@mark.mielke.cc)
Responses Re: Prepared statements considered harmful
Re: Prepared statements considered harmful
List pgsql-hackers
On Aug 31, 2006, at 11:18 , mark@mark.mielke.cc wrote:

> I'm attempting to understand why prepared statements would be used for
> long enough for tables to change to a point that a given plan will
> change from 'optimal' to 'disastrous'.
>
> Wouldn't this require that the tables are completely re-written, or
> that their data is drastically updated? For my own tables, most of the
> data remains static for months on end. Data is accumulated. Small
> changes are made. I don't see why a prepared statement used over a
> 24 hour period would ever become disastrous.

Scenario: A web application maintains a pool of connections to the  
database. If the connections have to be regularly restarted due to a  
postgres implementation detail (stale plans), then that is a database  
deficiency.

-M


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Prepared statements considered harmful
Next
From: Andrew Dunstan
Date:
Subject: Re: Prepared statements considered harmful