Re: upper planner path-ification

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers\@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2015-05-18T14:12:04Z
Lists: pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> Incidentally, the most obvious obstacle to better planning of grouping
> sets in the sorted cases is not so much how to pick paths in
> grouping_planner itself, but rather the fact that query_planner wants to
> be given only one sort order. Is there any prospect for improvement
> there?

Hm.  That's a hangover from when query_planner also gave back a Plan
(singular) rather than a set of Paths.  I don't see any fundamental reason
why we couldn't generalize it to be a list of potentially useful output
orderings rather than just one.  But I'm a bit concerned about the ensuing
growth in planning time; is it really all that useful?

			regards, tom lane