Re: left-deep plans? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: left-deep plans?
Date
Msg-id 6296.1109056029@sss.pgh.pa.us
Whole thread Raw
In response to Re: left-deep plans?  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.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


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: left-deep plans?
Next
From: Ian Barwick
Date:
Subject: Re: psql: recall previous command?