Re: RTREE on points - Mailing list pgsql-sql

From Jeff Hoffmann
Subject Re: RTREE on points
Date
Msg-id 3ADB65F4.6F83A1E7@propertykey.com
Whole thread Raw
In response to RTREE on points  ("Julian Scarfe" <julian@avbrief.com>)
Responses Re: RTREE on points  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-sql by date:

Previous
From: Dan Lyke
Date:
Subject: Using Random Sequence as Key
Next
From: Tom Lane
Date:
Subject: Re: RTREE on points