Re: SP-GiST for ranges based on 2d-mapping and quad-tree

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Date: 2012-07-11 23:03:34
Message-ID: CAPpHfdtJFpbs_PyAknzR0ZyB_Qvqa8MVjGrdtmid6pyDKEO-Sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 3, 2012 at 10:51 AM, Jeff Davis <pgsql(at)j-davis(dot)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 Content-Type Size
range_spgist_quad-0.3.patch application/octet-stream 43.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2012-07-11 23:11:19 Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Previous Message Daniel Farina 2012-07-11 22:51:40 Re: DELETE vs TRUNCATE explanation