Re: SP-GiST for ranges based on 2d-mapping and quad-tree - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Date
Msg-id CAPpHfdtJFpbs_PyAknzR0ZyB_Qvqa8MVjGrdtmid6pyDKEO-Sw@mail.gmail.com
Whole thread Raw
In response to Re: SP-GiST for ranges based on 2d-mapping and quad-tree  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: SP-GiST for ranges based on 2d-mapping and quad-tree
List pgsql-hackers
On Tue, Jul 3, 2012 at 10:51 AM, Jeff Davis <pgsql@j-davis.com> wrote:
Also, it would be helpful to add a couple tests to rangetypes.sql.

New version of patch is attached.

1) Idea of having different node numbers is that nodes takes some space (check spgFormInnerTuple). I've rethink this idea a little because adding of node without label just didn't work :). Only root inner index tuple have 5 nodes, others have 4. Thereby all empty ranges are branched already at root inner index tuple.

2) Empty prefix datum replaced with absence of prefix datum.

3) int2 replaced with int16.

4) I've added some tests which duplicates tests for GiST.

5) "connected" replaced with "adjacent"

6) allTheSame nodes is node created by SP-GiST core when it decide than result of picksplit method is not good enough. It divides tuples arbitrarily. So we have to visit all the nodes in this case during scan. See: http://www.postgresql.org/docs/devel/static/spgist-implementation.html#SPGIST-ALL-THE-SAME . Currently in-core SP-GiST opclasses behaves similarly.

I didn't decide how to rethink terms in comments yet :(

------
With best regards,
Alexander Korotkov.
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Event Triggers reduced, v1
Next
From: Alexander Korotkov
Date:
Subject: Re: SP-GiST for ranges based on 2d-mapping and quad-tree