Re: Support loser tree for k-way merge - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Support loser tree for k-way merge
Date
Msg-id 28f47336-84e2-445e-8216-d1ce7d3ddc3e@iki.fi
Whole thread Raw
In response to Support loser tree for k-way merge  ("cca5507" <cca5507@qq.com>)
Responses Re: Support loser tree for k-way merge
List pgsql-hackers
On 03/12/2025 13:48, cca5507 wrote:
> With the WIP patch(v1-0001), I got a 3% ~ 13%(different work_mem) speed up in the following test case:

Nice speedup!

> 1) Now I add a GUC 'enable_loser_tree' to control the use of loser tree, maybe we should
> decide whether to use the 'loser tree' based on the value of 'k', the complexity of tuple
> comparators or just always use the 'loser tree'?

What is the worst case scenario for the loser tree, where the heap is 
faster? How big is the difference?

- Heikki




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: POC: make mxidoff 64 bits
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Using MyDatabaseId in SET_LOCKTAG_APPLY_TRANSACTION