Re: Rtree; cannot create index on polygons with lots of points

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Blasby <dblasby(at)refractions(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rtree; cannot create index on polygons with lots of points
Date: 2001-05-24 11:35:51
Message-ID: 27759.990704151@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dave Blasby <dblasby(at)refractions(dot)net> writes:
> So far, so good, but when you try to create an rtree index, you get;
>> create index quick on test_geom using rtree (poly);
> ERROR: index_formtuple: data takes 20040 bytes, max is 8191

Yup. We don't yet have a solution that allows index entries to be moved
into a TOAST table (and even if we did, it'd doubtless be slower than
one would like for an index).

> The polygon type is actually creating the rtree index on a small portion
> of the actual polygon data (its boundingbox, NOT the actual points).
> Why does the index need to store the entire geometry?

rtree doesn't have any notion of compression or lossy storage of data.
GIST does, so I'd recommend that you take a hard look at moving over
to GIST. Over the long run I think we are going to abandon rtree in
favor of GIST --- the latter probably has more bugs at present, but once
those are flushed out I see no real reason to keep supporting rtree.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-05-24 11:49:03 Re: Smaller access privilege changes
Previous Message Peter Eisentraut 2001-05-24 11:07:24 Smaller access privilege changes