Hello List!<br><br>If I run the query like this:<br><br>SELECT a.caname FROM ca23jan06 a, ca23jan06 b <br>WHERE b.caname = 'Cataraqui Region' AND a.the_geom && b.the_geom<br>GROUP BY a.caname ORDER BY a.caname;<br>
<br>it returns the result instantly,<br>but if I try something like this:<br><br>SELECT a.caname FROM ca23jan06 a, ca23jan06 b <br>WHERE b.caname = 'Cataraqui Region' AND a.the_geom && b.the_geom<br>AND distance(a.the_geom
, b.the_geom) = 0<br>GROUP BY a.caname ORDER BY a.caname;<br><br>or this:<br><br>SELECT a.caname FROM ca23jan06 a, ca23jan06 b <br>WHERE b.caname = 'Cataraqui Region' AND a.the_geom && b.the_geom<br>AND touches(a.the_geom
, b.the_geom)<br>GROUP BY a.caname ORDER BY a.caname;<br><br>the process takes forever and I have to interrupt this violently<br><br>I've built oid index for ca23jan06 but it doesn't help<br>What can be the cause of such a behavior?
<br><br>Any idea will be much appreciated,<br><br>Thank you,<br><br>Alex Kuznetsov<br>SSFC GIS student<br><br>