Re: [HACKERS] Merge join for GiST - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: [HACKERS] Merge join for GiST
Date
Msg-id CAPpHfdsSeTy+zktk1qNATzWNTh58L3pyBYXNamh4BKHQgvr8Ng@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Merge join for GiST  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: [HACKERS] Merge join for GiST  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Tue, Apr 11, 2017 at 5:46 PM, Jeff Davis <pgsql@j-davis.com> wrote:
On Tue, Apr 11, 2017 at 2:17 AM, Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> FYI, I've implemented this algorithm for pgsphere.  See following branch.
> https://github.com/akorotkov/pgsphere/tree/experimental
> It's implemented as crossmatch() function which takes as arguments names of
> two indexes over spoint and maximum distance (it checks not overlapping but
> proximity of points).  This function returns setof pairs of TIDs.
>
> Later, Dmitry Ivanov made it a custom scan node.
> https://github.com/akorotkov/pgsphere/tree/crossmatch_cnode
>
> You also can find some experimental evaluation here:
> http://www.adass2016.inaf.it/images/presentations/10_Korotkov.pdf

Do you have a sense of how this might compare with range merge join?

If you have GiST indexes over ranges for both sides of join, then this method could be used for range join.  Hence, it could be compared with range merge join.
However, particular implementation in pgsphere uses hardcoded datatypes and operations.
Thus, for range join we need either generalized version of GiST-based join or special implementation for ranges.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
 

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] error handling in RegisterBackgroundWorker
Next
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] Reversed sync check in pg_receivewal