[postgis-users] performance of intersects(a,b)

Willy-Bas Loos willybas at gmail.com
Thu Feb 14 06:11:58 PST 2008


Hi,

I´ve noticed that intersect(a,b) is slow when i compare a (nice and large)
geometry with itself.
so the syntax is:

select 'yes' as foo
from table1 a, table1 b
where a.gid=4
and b.gid=4
and intersects(a.the_geom, b.the_geom)

This particular polygon has about 10 000 points, and the query runs for 4
whole seconds.
At the first point that is being compared, however, PostGIS should notice
that it has a "positive".

I´m only using postgis 1.0, so this migt have been changed allready. Has it?

WBL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080214/992e8da8/attachment.html>


More information about the postgis-users mailing list