New Minmax index for geometry data type? - Mailing list pgsql-hackers

From Stefan Keller
Subject New Minmax index for geometry data type?
Date
Msg-id CAFcOn28XbV_N8sdNwWq8hQjikKfNo5_Y0H=Hke=B3yJD4WhB2A@mail.gmail.com
Whole thread Raw
List 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@2ndquadrant.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers



pgsql-hackers by date:

Previous
From: worthy7
Date:
Subject: GIST create index very very slow
Next
From: Josh Berkus
Date:
Subject: Re: [Bad Attachment] Re: jsonb format is pessimal for toast compression