Re: Avoid extra Sort nodes between WindowAggs when sorting can bereused

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Avoid extra Sort nodes between WindowAggs when sorting can bereused
Дата
Msg-id 0291AC74-9B0C-43E9-B353-5FC07D8EA267@yesql.se
обсуждение исходный текст
Ответ на Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Avoid extra Sort nodes between WindowAggs when sorting can bereused  (Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>)
Список pgsql-hackers
> On 3 Jul 2018, at 12:24, Masahiko Sawada <sawada.mshk@gmail.com> wrote:

> Thank you for updating the patch.

Thanks for reviewing!

> Hmm, this is missing the eqop fields of SortGroupClause. I haven't
> tested yet but does the similar degradation happen if two
> SortGroupCaluses have different eqop and the same other values?

I wasn’t able to construct a case showing this, but I also think you’re right.
Do you have an idea of a query that can trigger a regression?  The attached
patch adds a stab at this, but I’m not sure if it’s the right approach.

> The source code comments for common_prefix_cmp() function and
> WindowClauseSortNode struct is needed.

Fixed.

> +  from empsalary;
>
> I think it's better to change "from empsalary" to "FROM empsalary" for
> consistency with other code.

Yes, that was a silly oversight. Fixed.

cheers ./daniel


Вложения

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

Предыдущее
От: Isaac Morland
Дата:
Сообщение: Re: How can we submit code patches that implement our (pending) patents?
Следующее
От: Toshi Harada
Дата:
Сообщение: "WIP: Data at rest encryption" patch and, 2 phase commit.