[postgis-users] Overlap Queries - speed

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Tue Oct 4 05:07:05 PDT 2005


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of challu at fas.harvard.edu
> Sent: 04 October 2005 00:59
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Overlap Queries - speed
> 
> 
> From what I gathered from the documentation (postgis.pdf), && tests
overlapping
> of bounding boxes. If my understanding is correct, then, it 
> doesn't matter the actual shape of the forms. The only 
> important thing is to add bounding boxes in the fields. That 
> was in fact my experience: a similar query (although perhaps 
> with fewer cases) took too long to perform. I didn't matter 
> the two geometry fields were indexed. What made the 
> difference was redoing the geometry field with a bounding 
> box. After that the query took a couple of seconds, not 10 
> minutes and it sped up considerably other spatial operations 
> such as contains(). I hope this helps... Amilcar


Hi Amilcar,

Really? The default behviour should be to automatically store bounding boxes
for geometries beyond a certain complexity, although I'm not sure exactly
what the criteria for that without digging into the source. Would it be
possible to make your dataset and your query available for testing by
developers?

For that level of speed improvement, I wonder if it would not be more
sensible to make having forced bounding boxes the default? It's the type of
optimisation which I can only imagine would make a great difference for
people with very large datasets consisting of relatively simple geometries,
whereas the more casual user may be blissfully ignorant of their existence
yet reap the benefits.


Kind regards,

Mark.

------------------------
WebBased Ltd
South West Technology Centre
Tamar Science Park
Plymouth
PL6 8BT 

T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk





More information about the postgis-users mailing list