Re: left-deep plans?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: left-deep plans?
Date: 2005-02-22 07:07:09
Message-ID: 6296.1109056029@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway <neilc(at)samurai(dot)com> writes:
> Tom Lane wrote:
>> Once we get into GEQO territory, we are using the left-deep-only
>> heuristic because that's the only kind of plan GEQO can construct.

> I think most applications would prefer an exhaustive, deterministic
> search of a subset of the search space over a non-exhaustive,
> non-deterministic search of the same subset, given approximately the
> same performance.

I am not by any means standing up to defend GEQO as being the best
way to do partial searches ;-). Just saying that in the regime where
we can hope to do complete searches, we shouldn't exclude bushy plans.

> Speaking of which, why does GEQO restrict its search to left-deep plans
> only?

Well, because it's really a traveling-salesman algorithm, and it models
the "find a good join tree" problem as "find a good tour". I've
commented before that I don't believe this is a particularly good model
--- intuitively it doesn't seem that the cost functions have the same
structure. But I've not had time to look for a better heuristic
algorithm. Just one of the many things on the TODO list ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Barwick 2005-02-22 07:18:19 Re: psql: recall previous command?
Previous Message Neil Conway 2005-02-22 06:40:40 Re: left-deep plans?