Hello all,<br>

           I am
working with spatial tables  in postgresql with postgis support. i have two spatial data tables, one
represents the whole state and another table represents the damaged
locations in the state. My aim is to find number of damaged locations
in every county or parish.<br>

Here i am giving the query i used to do this, could you please tell me whether i am doing right thing or not.<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><br>
</span></span></span><span style="font-weight: bold;"><br>
"select count(*) from locations
l1,county l2 where l1.the_geom && l2.the_geom and
intersects(l2.the_geom,l1.the_geom) and l2.countyid= some particular ID"<br>
<span style="font-weight: bold;"><br>
</span></span>It gave some results, but i am not sure whether the query is correct or not,<br>
I have one more problem with this query, this query taking lot of time when <span style="font-weight: bold;">some particular ID </span>ends with 9999(ex:220750501002999,xxxxxxx9999), do u have any idea about this strange situation.
<br>
<br>
excuse my english and method of requesting for help if there are any errors.<br>
Thanks in advance.<br>
have a nice day<br>
cheers<br>
vamsee <br>