Re: RTREE on points

From: Jeff Hoffmann <jeff(at)propertykey(dot)com>
To: Julian Scarfe <julian(at)avbrief(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: RTREE on points
Date: 2001-04-16 21:36:52
Message-ID: 3ADB65F4.6F83A1E7@propertykey.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Julian Scarfe wrote:
>
> It hadn't occured to me that the index would simply not be used and I'm
> grateful for the pointer to the appropriate variable.

i wouldn't recommend turning off sequential scans for day-to-day usage,
but it certainly can be useful for debugging and testing. if you have
specific queries that you need optimized, you can do that, but the whole
point of cost estimates is to give a good estimate of what a normal
query would return, so if you have a lot of ad-hoc queries, it's
probably better to just trust the system.

> Nevertheless, wouldn't...
>
> CREATE INDEX test_rtree ON nodes USING RTREE (node);
> (which fails)
>
> ...be a lot simpler than...
>
> CREATE INDEX test_rtree ON nodes USING RTREE (box(node,node));
> (which succeeds, as above)
>
> ?

yes, it does seem like a little more work, but there doesn't seem to be
a lot of usage of the geometric functions by the developers to look at
missing features -- they're mostly just reactive to problems. i really
have never dug into tweaking access methods to get this to work, but i
would imagine it's not that hard to implement.

--

Jeff Hoffmann
PropertyKey.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bernardo de Barros Franco 2001-04-16 22:30:42 Re: Using Random Sequence as Key
Previous Message Dan Lyke 2001-04-16 20:16:29 Using Random Sequence as Key