Presently the planner considers left-deep, right-deep, and bushy plans
(i.e. it will consider plans in which the outer operand of a join is a
join, the inner operand is a join, or both operands are joins). It is a
fairly standard heuristic in the literature to restrict the search to
left-deep plans, on the grounds that this significantly reduces the set
of plans to consider, and the more efficient plans are _usually_ found
in the set of left-deep plans (since we can do pipelining more
efficiently). Has there been any thought about applying this optimization?
(I doubt it would be wise to unconditionally restrict the search to
left-deep plans, but there may be situations in which applying this
heuristic would allow the regular planner to be used instead of GEQO.
Perhaps a GUC variable?)
-Neil