Re: tuple radix sort - Mailing list pgsql-hackers

From cca5507
Subject Re: tuple radix sort
Date
Msg-id tencent_9748E2B51D64D949856216A6D59EA6BCC80A@qq.com
Whole thread Raw
In response to Re: tuple radix sort  (John Naylor <johncnaylorls@gmail.com>)
Responses Re: tuple radix sort
List pgsql-hackers
Hi John,

> This turned out to be a loser, but in the course of trying it a better
> idea occurred to me. v8's prefix detection was really a special-case
> optimization where the sort key is all non-negative integers (or all
> negative, but that's not common). It's wasted work when the input is
> mixed in sign, and for abbreviated keys. It's not much of a waste, but
> we can do better.
>
> v9 computes the common prefix during every recursion at the same time
> we populate the SortTuple's current byte. That should be practically
> free given a modest amount of instruction-level parallelism.

+1 and v9-0001 LGTM.

--
Regards,
ChangAo Chen

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Skipping schema changes in publication
Next
From: Nisha Moond
Date:
Subject: Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion?