Re: POC: GROUP BY optimization

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: POC: GROUP BY optimization
Дата
Msg-id 3bbdd1ee-544d-a549-b0c2-30485d9f6a16@sigaev.ru
обсуждение исходный текст
Ответ на Re: POC: GROUP BY optimization  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: POC: GROUP BY optimization  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
>> I tried to attack the cost_sort() issues and hope on that basis we can solve 
>> problems with 0002 patch and improve incremental sort patch.
>>
> 
> OK, will do. Thanks for working on this!

I hope, now we have a better cost_sort(). The obvious way is a try all 
combination of pathkeys in get_cheapest_group_keys_order() and choose cheapest 
one by cost_sort(). But it requires N! operations and potentially could be very 
expensive in case of large number of pathkeys and doesn't solve the issue with 
user-knows-what-he-does pathkeys. We could suggest an order of pathkeys as patch 
suggests now and if cost_sort() estimates cost is less than 80% (arbitrary 
chosen) cost of user-suggested pathkeys then it use our else user pathkeys.


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: ERROR: cannot start subtransactions during a parallel operation
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: POC: GROUP BY optimization