Teaching query_planner to handle multiple sort orders?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Teaching query_planner to handle multiple sort orders?
Date: 2017-01-07 15:57:30
Message-ID: 8737guzx9u.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So in the grouping sets patch post, I said:

>> There is one current weakness which I don't see a good solution for:
>> the planner code still has to pick a single value for group_pathkeys
>> before planning the input path. This means that we sometimes can't
>> choose a minimal set of sorts, because we may have chosen a sort
>> order for a grouping set that should have been hashed,

Of course there is one good solution, which is to have query_planner
take a set of acceptable output sort orders rather than just a single
one.

How wild an idea is this? I guess a possible hazard is an increase in
the number of possible mergejoin paths to consider. What other possible
issues are there?

--
Andrew (irc:RhodiumToad)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2017-01-07 16:02:06 Re: pg_stat_activity.waiting_start
Previous Message amul sul 2017-01-07 14:12:35 Re: pg_background contrib module proposal