Re: Merge join for GiST

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Andrew Borodin <amborodin(at)acm(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Sergey Mirvoda <sergey(at)mirvoda(dot)com>
Subject: Re: Merge join for GiST
Date: 2017-04-11 15:35:45
Message-ID: CAPpHfdsSeTy+zktk1qNATzWNTh58L3pyBYXNamh4BKHQgvr8Ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 11, 2017 at 5:46 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:

> On Tue, Apr 11, 2017 at 2:17 AM, Alexander Korotkov
> <a(dot)korotkov(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2017-04-11 15:37:59 Re: Reversed sync check in pg_receivewal
Previous Message Tom Lane 2017-04-11 15:33:34 Re: error handling in RegisterBackgroundWorker