Re: Add proper planner support for ORDER BY / DISTINCT aggregates

Поиск
Список
Период
Сортировка
От Ronan Dunklau
Тема Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Дата
Msg-id 2746808.Lq6AjvN2yG@aivenronan
обсуждение исходный текст
Ответ на Re: Add proper planner support for ORDER BY / DISTINCT aggregates  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Список pgsql-hackers
Le mardi 13 juillet 2021, 06:44:12 CEST David Rowley a écrit :
> I've attached the updated patches.

The approach of building a pathkey for the first order by we find, then
appending to it as needed seems sensible but I'm a bit worried about users
starting to rely on this as an optimization. Even if we don't document it,
people may start to change the order of their target lists to "force" a
specific sort on the lower nodes. How confident are we that we won't change this
or that we will be willing to break it ?

Generating all possible pathkeys and costing the resulting plans would be too
expensive, but maybe a more "stable" (and limited) approach would be fine, like
generating the pathkeys only if every ordered aggref shares the same prefix. I
don't think there would be any ambiguity here.

--
Ronan Dunklau





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Следующее
От: Ibrar Ahmed
Дата:
Сообщение: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails