Re: POC: GROUP BY optimization

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: POC: GROUP BY optimization
Дата
Msg-id CAPpHfdvnpQ_78_bW8TQU_j64haz9WGOYS3Zx=5tw70ge7c_eWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: POC: GROUP BY optimization  (Andrei Lepikhov <a.lepikhov@postgrespro.ru>)
Ответы Re: POC: GROUP BY optimization
Список pgsql-hackers
On Thu, Dec 28, 2023 at 10:22 AM Andrei Lepikhov
<a.lepikhov@postgrespro.ru> wrote:
> But arrangement with an ORDER BY clause doesn't work:
>
> DROP INDEX abc;
> explain SELECT x,w,z FROM t GROUP BY (w,x,z) ORDER BY (x,z,w);
>
> I think the reason is that the sort_pathkeys and group_pathkeys are
> physically different structures, and we can't just compare pointers here.

I haven't yet looked into the code.  But this looks strange to me.
Somehow, optimizer currently matches index pathkeys to ORDER BY
pathkeys.  If GROUP BY pathkeys could be matched to index pathkeys,
then it should be possible to match them to ORDER BY pathkeys too.


------
Regards,
Alexander Korotkov



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

Предыдущее
От: Shinya Kato
Дата:
Сообщение: Re: Set log_lock_waits=on by default
Следующее
От: Robins Tharakan
Дата:
Сообщение: Re: pg_upgrade failing for 200+ million Large Objects