Re: Planner creating ineffective plans on LEFT OUTER joins - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Planner creating ineffective plans on LEFT OUTER joins
Date
Msg-id 1214499284.3845.216.camel@ebony.site
Whole thread Raw
In response to Re: Planner creating ineffective plans on LEFT OUTER joins  ("Robert Haas" <robertmhaas@gmail.com>)
Responses Re: Planner creating ineffective plans on LEFT OUTER joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 2008-06-26 at 12:36 -0400, Robert Haas wrote:
> > IMHO we should have a single parameter which indicates how much planning
> > time we consider acceptable for this query. e.g.
> >
> >  optimization_level = 2 (default), varies 1-3
> >
> > Most automatic optimisation systems allow this kind of setting, whether
> > it be a DBMS, or compilers (e.g. gcc).
> 
> It's my understanding that the philosophy of the PGDG in the past has
> been to avoid putting any kind of hints into the system, focusing
> rather an improving the planning of queries.

It's not a specific hint, its a general goal setting. Providing
information to the optimizer about our goals is not a universally bad
thing; telling it to force a particular plan against its better
judgement probably is.

For example, gcc has exactly this kind of optimization mode. -O2 should
be acceptable to us, but an option like -fsplit-ivs-in-unroller probably
isn't.

> If one were to add a hint, I think the hint should tell the planner:
> Hey, see this left join? 

Now that *is* a hint.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Re: MSVC 2003 compile error with pg8.3.3
Next
From: Tom Lane
Date:
Subject: Re: get_relation_stats_hook()