Re: [Patch] Build the heap more efficient in tuplesort.c

Поиск
Список
Период
Сортировка
От cca5507
Тема Re: [Patch] Build the heap more efficient in tuplesort.c
Дата
Msg-id tencent_1D73A1CE850DB5F1294932EA7844071D7608@qq.com
обсуждение исходный текст
Ответ на Re: [Patch] Build the heap more efficient in tuplesort.c  ("cca5507" <cca5507@qq.com>)
Список pgsql-hackers
Hi,

Generally speaking, build the heap by tuplesort_heap_build() is O(n) while tuplesort_heap_insert() is
O(n log n), so the former is better.

I'm not sure why tuplesort_heap_build() is worse than tuplesort_heap_insert() when handling random
data sometimes, maybe my test method is wrong? Any ideas?

The v2-0001 refactor some code, mark some function as always inline and reduce some useless copy
of SortTuple.

--
Regards,
ChangAo Chen

Вложения

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