Re: [HACKERS] The case for removing replacement selection sort

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: [HACKERS] The case for removing replacement selection sort
Дата
Msg-id 266de004-5b70-5ece-a10a-f9ae34cc14e6@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] The case for removing replacement selection sort  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] The case for removing replacement selection sort  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] The case for removing replacement selection sort  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On 09/11/2017 05:32 PM, Robert Haas wrote:
> On Sun, Sep 10, 2017 at 9:39 PM, Peter Geoghegan <pg@bowt.ie> wrote:
>> To be clear, you'll still need to set replacement_sort_tuples high
>> when testing RS, to make sure that we really use it for at least the
>> first run when we're expected to. (There is no easy way to have
>> testing mechanically verify that we really do only have one run in the
>> end with RS, but I assume that such paranoia is unneeded.)
> 
> I seem to recall that raising replacement_sort_tuples makes
> replacement selection look worse in some cases -- the optimization is
> more likely to apply, sure, but the heap is also bigger, which hurts.
> 

The question is what is the optimal replacement_sort_tuples value? I
assume it's the number of tuples that effectively uses CPU caches, at
least that's what our docs say. So I think you're right it to 1B rows
may break this assumption, and make it perform worse.

But perhaps the fact that we're testing with multiple work_mem values,
and with smaller data sets (100k or 1M rows) makes this a non-issue?

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] psql - add special variable to reflect the last query status
Следующее
От: Erik Rijkers
Дата:
Сообщение: Re: [HACKERS] Automatic testing of patches in commit fest