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

Re: Planner creating ineffective plans on LEFT OUTERjoins

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Planner creating ineffective plans on LEFT OUTERjoins
Date: 2008-06-26 16:54:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

> 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 
 PostgreSQL Training, Services and Support

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2008-06-26 16:57:38
Subject: Re: Planner creating ineffective plans on LEFT OUTER joins
Previous:From: Tom LaneDate: 2008-06-26 16:50:56
Subject: Re: get_relation_stats_hook()

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