[postgis-users] find adjacent polygons query problem
Alex Kuznetsov
nexikan at gmail.com
Sun Jul 9 14:40:37 PDT 2006
Hello List!
If I run the query like this:
SELECT a.caname FROM ca23jan06 a, ca23jan06 b
WHERE b.caname = 'Cataraqui Region' AND a.the_geom && b.the_geom
GROUP BY a.caname ORDER BY a.caname;
it returns the result instantly,
but if I try something like this:
SELECT a.caname FROM ca23jan06 a, ca23jan06 b
WHERE b.caname = 'Cataraqui Region' AND a.the_geom && b.the_geom
AND distance(a.the_geom, b.the_geom) = 0
GROUP BY a.caname ORDER BY a.caname;
or this:
SELECT a.caname FROM ca23jan06 a, ca23jan06 b
WHERE b.caname = 'Cataraqui Region' AND a.the_geom && b.the_geom
AND touches(a.the_geom, b.the_geom)
GROUP BY a.caname ORDER BY a.caname;
the process takes forever and I have to interrupt this violently
I've built oid index for ca23jan06 but it doesn't help
What can be the cause of such a behavior?
Any idea will be much appreciated,
Thank you,
Alex Kuznetsov
SSFC GIS student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060709/846e4c40/attachment.html>
More information about the postgis-users
mailing list