New Minmax index for geometry data type?

From: Stefan Keller <sfkeller(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: New Minmax index for geometry data type?
Date: 2014-08-15 22:13:00
Message-ID: CAFcOn28XbV_N8sdNwWq8hQjikKfNo5_Y0H=Hke=B3yJD4WhB2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Alvaro

2014-08-15 20:16 GMT+02:00 you answered:
> (...)
> Yeah, it's just a matter of adding an opclass for it -- pretty simple
(...)
> Right now there are opclasses for the following types:
(...)
> Of course, the real interesting part is adding a completely different
> opclass, such as one that stores bounding boxes.

That was exactly what I was going to ask you regarding support of
minmax (block range) index for GEOMETRY types (as defined in PostGIS):

1. What would be the advantage of such a minmax index over GiST besides size?
2. Are the plans to implement this?
3. If no, how large would you estimate the efforts to implement this
in days for an experienced programmer like you?

Yours, Stefan

2014-08-15 20:16 GMT+02:00 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:
> Fujii Masao wrote:
>
>> I've not read the patch yet. But while testing the feature, I found that
>>
>> * Brin index cannot be created on CHAR(n) column.
>> Maybe other data types have the same problem.
>
> Yeah, it's just a matter of adding an opclass for it -- pretty simple
> stuff really, because you don't need to write any code, just add a bunch
> of catalog entries and an OPCINFO line in mmsortable.c.
>
> Right now there are opclasses for the following types:
>
> int4
> numeric
> text
> date
> timestamp with time zone
> timestamp
> time with time zone
> time
> "char"
>
> We can eventually extend to cover all types that have btree opclasses,
> but we can do that in a separate commit. I'm also considering removing
> the opclass for time with time zone, as it's a pretty useless type. I
> mostly added the ones that are there as a way to test that it behaved
> reasonably in the various cases (pass by val vs. not, variable width vs.
> fixed, different alignment requirements)
>
> Of course, the real interesting part is adding a completely different
> opclass, such as one that stores bounding boxes.
>
>> * FILLFACTOR cannot be set in brin index.
>
> I hadn't added this one because I didn't think there was much point
> previously, but I think it might now be useful to allow same-page
> updates.
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-08-15 22:18:30 Re: [Bad Attachment] Re: jsonb format is pessimal for toast compression
Previous Message worthy7 2014-08-15 21:59:19 GIST create index very very slow