Received: from www.propertykey.com (propertykey.com [206.196.37.193]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3GLc2u93669 for ; Mon, 16 Apr 2001 17:38:02 -0400 (EDT) (envelope-from jeff@propertykey.com) Received: from propertykey.com (gotojail.propertykey.com [206.196.37.197]) by www.propertykey.com (8.9.3/8.9.3) with ESMTP id QAA19870; Mon, 16 Apr 2001 16:37:54 -0500 Message-ID: <3ADB65F4.6F83A1E7@propertykey.com> Date: Mon, 16 Apr 2001 16:36:52 -0500 From: Jeff Hoffmann Organization: PropertyKey.com X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Scarfe CC: pgsql-sql@postgresql.org Subject: Re: RTREE on points References: <9bbtqv$688$1@news.tht.net> <3ADAFF38.E7147C8D@propertykey.com> <008f01c0c68a$b6651c00$2285fd3e@julian> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/257 X-Sequence-Number: 2607 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