Re: Introduce Index Aggregate - new GROUP BY strategy

Поиск
Список
Период
Сортировка
Искать
От
Sergey Soloviev
Тема
Re: Introduce Index Aggregate - new GROUP BY strategy
Дата
Msg-id
345c715f-edb2-4903-9ae1-00d6ca7e92f1@tantorlabs.ru
Ответ на
Список
Дерево обсуждения
Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy David Rowley <dgrowleyml@gmail.com>
Re: Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Сергей Соловьев <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Andrei Lepikhov <lepihov@gmail.com>
Re: Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Sergey Soloviev <sergey.soloviev@tantorlabs.ru>
Re: Introduce Index Aggregate - new GROUP BY strategy Andrei Lepikhov <lepihov@gmail.com>
Hi!

I have finally added support for Partial IndexAggregate. There was a problem with
sortgroupref and target list entries mismatch due to partial aggregates in it.
To solve this I had to add new argument to 'create_agg_path' - 'pathkeys' which is
a List of PathKey.

Previously this information was calculated in the function just like AGG_SORTED
do this. But when we calculating pathkeys we must consider whether it is a child
rel to properly build pathkeys and if so use it's parent. The latter information is
not known inside 'create_agg_path', thus instead of passing 'parent' we explicitly
pass already built 'pathkeys'. I did not change AGG_SORTED logic, so this  is used
only by AGG_INDEX.

This logic is placed in another patch file just to make review of this change easier.

Also, cost calculation logic is adjusted a bit - it takes into account top-down index
traversal and final external merge cost is added only if spill expected.

---
Sergey Soloviev
TantorLabs: https://tantorlabs.com
В списке pgsql-hackers по дате отправления
От: Nathan Bossart
Дата:
От: Robert Haas
Дата:
Сообщение: Re: pg_plan_advice
FAQ