On Thu, Aug 31, 2006 at 10:09:10AM -0400, Theo Schlossnagle wrote:
> 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.

> A good query planner hint system would act as a catalyst to the  
> improvement of the current query planner as users could share their  
> complex queries and associated improved query plans through hinting.

Would a hint system allow the planner to execute quicker? Eliminate
plans from consideration early, without evaluation how long they might
take to execute? Sort of possible today with toggling of the 'seqscan'
and other such options... :-)

> I like Postgres a lot, I think the people that work on it are very  
> very sharp.  I do feel that the consistent refusal to allow query  
> hinting to be introduced demonstrates an unhealthy amount of hubris  
> that, in the end, negatively impacts users.

Hubris isn't always bad. If hints were provided, the need for the
fully automatic planner to improve would be reduced. But yes, they do
seem to be competing goals, disenfranchising the user.

> While Postgres is missing a ton of other needed features, I rarely  
> see the attitude that they are _unwanted_.  Instead I see the "if it  
> is important to you, go build it" attitude which is what I would  
> expect in an open source project.

There is also "what you submit should be maintainable because we know
you might disappear at any time".


.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to