Skip site navigation (1) Skip section navigation (2)

Re: Prepared statements considered harmful

From: AgentM <agentm(at)themactionfaction(dot)com>
To: postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared statements considered harmful
Date: 2006-08-31 15:36:36
Message-ID: 92531E2A-E8C6-4FF8-A437-C4A5198C3AA2@themactionfaction.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Aug 31, 2006, at 11:18 , mark(at)mark(dot)mielke(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2006-08-31 15:43:23
Subject: Re: Prepared statements considered harmful
Previous:From: markDate: 2006-08-31 15:27:18
Subject: Re: Prepared statements considered harmful

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group