Re: PoC: Partial sort

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: PoC: Partial sort
Дата
Msg-id CAPpHfdv5R866oyq1fhEwf0HSBOC9B5P8fYT+sTsjLfausp=-QA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PoC: Partial sort  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
On Sun, Dec 22, 2013 at 8:12 PM, Martijn van Oosterhout <kleptog@svana.org> wrote:
On Sun, Dec 22, 2013 at 07:38:05PM +0400, Alexander Korotkov wrote:
> Hi!
>
> Next revision. It expected to do better work with optimizer. It introduces
> presorted_keys argument of cost_sort function which represent number of
> keys already sorted in Path. Then this function uses estimate_num_groups to
> estimate number of groups with different values of presorted keys and
> assumes that dataset is uniformly divided by
> groups. get_cheapest_fractional_path_for_pathkeys tries to select the path
> matching most part of path keys.
> You can see it's working pretty good on single table queries.

Nice work! The plans look good and the calculated costs seem sane also.

I suppose the problem with the joins is generating the pathkeys?

In general, problem is that partial sort is alternative to do less restrictive merge join and filter it's results. As far as I can see, taking care about it require some rework of merge optimization. For now, I didn't get what it's going to look like. I'll try to dig more into details.

------
With best regards,
Alexander Korotkov.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WITHIN GROUP patch
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: PoC: Partial sort