Re: Memory usage during sorting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Memory usage during sorting
Дата
Msg-id 1729.1332277605@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Memory usage during sorting  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Yeah, I think I'm going to try implementing
> quicksort-the-whole-batch-and-dump-it-out-as-a-run algorithm, just to
> see how good or bad that is compared to what we have now.  We may not
> end up doing anything that remotely resembles that, in the end, but I
> want to see the numbers.

The reason replacement selection is attractive is that the initial runs
tend to be about twice as long as you can get if you just sort
memory-loads independently.  (And that's for random input, the win can
be a lot more on partially ordered data.)  It seems unlikely that you
will get enough win from quicksorting to overcome that; especially not
if your thesis is correct that all the cost is coming from comparison
infrastructure.

But don't let me discourage you from measuring it ...
        regards, tom lane


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Memory usage during sorting
Следующее
От: Tom Lane
Дата:
Сообщение: Re: vacuumlo issue