Re: Yet another fast GiST build - Mailing list pgsql-hackers

From Pavel Borisov
Subject Re: Yet another fast GiST build
Date
Msg-id CALT9ZEEtc67W6ypNcyOwwgryA+QjOFdL6M2+LhdkLpkzwtUbdQ@mail.gmail.com
Whole thread Raw
In response to Re: Yet another fast GiST build  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Yet another fast GiST build
List pgsql-hackers

>> I suppose there is a big jump in integer value (whether signed or
>> unsigned) as you cross from positive to negative floats, and then the
>> sort order is reversed.  I have no idea if either of those things is a
>> problem worth fixing.  That made me wonder if there might also be an

I took a stab at fixing this, see attached patch (applies on top of your
patch v14).

To evaluate this, I used the other attached patch to expose the zorder
function to SQL, and plotted points around zero with gnuplot. See the
attached two images, one with patch v14, and the other one with this patch.

I'd made testing of sorted SpGist build in cases of points distributed only in 2d quadrant and points in all 4 quadrants and it appears that this abnormality doesn't affect as much as Andrey supposed. But Heikki's patch is really nice way to avoid what can be avoided and I'd like it is included together with Andrey's patch.

Pavel.

pgsql-hackers by date:

Previous
From: Emre Hasegeli
Date:
Subject: Re: Bogus documentation for bogus geometric operators
Next
From: vignesh C
Date:
Subject: Re: Parallel copy