Re: Abbreviated keys for Numeric - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Abbreviated keys for Numeric
Date
Msg-id 87twygdqu9.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Abbreviated keys for Numeric (was: Re: B-Tree support function number 3 (strxfrm() optimization))  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Abbreviated keys for Numeric
List pgsql-hackers
>>>>> "Tomas" == Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
>> Right...so don't test a datum sort case, since that isn't supported>> at all in the master branch. Your test case is
invalidfor that>> reason.
 
Tomas> What do you mean by 'Datum sort case'?

A case where the code path goes via tuplesort_begin_datum rather than
tuplesort_begin_heap.
Tomas> The test I was using is this:
Tomas>    select percentile_disc(0) within group (order by randnum) from stuff;

Sorting single columns in aggregate calls uses the Datum sort path (in
fact I think it's currently the only place that does).

Do that test with _both_ the Datum and Numeric sort patches in place,
and you will see the effect. With only the Numeric patch, the numeric
abbrev code is not called.

If you want a test that works without the Datum patch, try:

select count(*) from (select randnum from stuff order by randnum) s;

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Abbreviated keys for Numeric (was: Re: B-Tree support function number 3 (strxfrm() optimization))
Next
From: Tomas Vondra
Date:
Subject: Re: Abbreviated keys for Numeric