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

From Jeff Davis
Subject Re: Prepared statements considered harmful
Date
Msg-id 1157050544.15937.13.camel@dogma.v10.wvs
Whole thread Raw
In response to Re: Prepared statements considered harmful  (Theo Schlossnagle <jesus@omniti.com>)
List pgsql-hackers
On Thu, 2006-08-31 at 10:09 -0400, Theo Schlossnagle wrote:
> On Aug 31, 2006, at 9:25 AM, Peter Eisentraut wrote:
> 
> > Am Donnerstag, 31. August 2006 15:05 schrieb Merlin Moncure:
> >> The proposal to supply hints to statements and functions has been
> >> voted down several times due to the argument that it is better to fix
> >> the planner.  I think supplying hints does fix the planner, and is a
> >> balanced solution.
> >

> There are many databases out there with better planners than  
> PostgreSQL -- likely there will always be.  Even those databases have  
> query planner hints.  Why?  Because the authors of those database had  
> the humility to realize that the planner they designed wasn't perfect  
> and that people _still_ need their database to perform well despite a  
> non-optimal query plan here and there.

You can see a related discussion here:

http://archives.postgresql.org/pgsql-hackers/2006-08/msg00463.php

What I understood from that thread was that the concept of planner hints
was not completely rejected. I think the most likely outcome (if any
planning system is implemented) is some mechanism to state the hint in a
separate SQL declaration rather than inside the query itself. This can
still result in potentially stale (or very stale) plans, but at least
you don't have to change your application every time you modify the
"hints". However, as far as I know, this has not progressed beyond the
brainstorming stage.

I think many people are still very skeptical of various implementations
of planner hints, but there is some reasonable level of discussion.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Backend SSL configuration enhancement
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Interval aggregate regression failure