Re: [Patch] Build the heap more efficient in tuplesort.c - Mailing list pgsql-hackers

From cca5507
Subject Re: [Patch] Build the heap more efficient in tuplesort.c
Date
Msg-id tencent_1D73A1CE850DB5F1294932EA7844071D7608@qq.com
Whole thread Raw
In response to Re: [Patch] Build the heap more efficient in tuplesort.c  ("cca5507" <cca5507@qq.com>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations
Next
From: Peter Eisentraut
Date:
Subject: Re: warning: dereferencing type-punned pointer