Re: Simple join optimized badly? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Simple join optimized badly?
Date
Msg-id 19817.1160369035@sss.pgh.pa.us
Whole thread Raw
In response to Re: Simple join optimized badly?  (Mark Kirkwood <markir@paradise.net.nz>)
Responses Re: Simple join optimized badly?
List pgsql-performance
Mark Kirkwood <markir@paradise.net.nz> writes:
> True enough - but (aside from the fact that hints might take just as
> long to get into the development tree as cost-for-functions might take
> to write and put in...) there is a nasty side effect to adding hints -
> most of the raw material for optimizer improvement disappears (and hence
> optimizer improvement stalls)- why? simply that everyone then hints
> everything - welcome to the mess that Oracle are in (and seem to be
> trying to get out of recently)!

And *that* is exactly the key point here.  Sure, if we had unlimited
manpower we could afford to throw some at developing a hint language
that would be usable and not too likely to break at every PG revision.
But we do not have unlimited manpower.  My opinion is that spending
our development effort on hints will have a poor yield on investment
compared to spending similar effort on making the planner smarter.

Josh's post points out some reasons why it's not that easy to get
long-term benefits from hints --- you could possibly address some of
those problems, but a hint language that responds to those criticisms
won't be trivial to design, implement, or maintain.  See (many) past
discussions for reasons why not.

            regards, tom lane

pgsql-performance by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Simple join optimized badly?
Next
From: "Merlin Moncure"
Date:
Subject: Re: Performance Optimization for Dummies 2 - the SQL