No error message, just "error"?, that sounds like you disconnected from the server.<br>That would mean that something broke off teh connection (a NAT firewall?) or the query makes the service crash.<br>You should try it again and if the error persists, check the server log.<br>
<br>Cheers,<br><br>WBL<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 10, 2012 at 3:46 PM, Francisco Salas <span dir="ltr"><<a href="mailto:fsalas@pinar.geocuba.cu" target="_blank">fsalas@pinar.geocuba.cu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Nicklas , I used this<br>
<div class="im">select * from pozos p,suelos s where ST_DWithin(p.the_geom,s.the_geom,1000)<br>
<br>
</div>but in the output panel Messages of the pgAdmin III , appear only this<br>
around 22011 ms<br>
********** Error **********<br>
<br>
How  I can determinate what's is the problems ?<br>
<br>
Regards,<br>
Francisco Salas<br>
<br>
-----Mensaje original-----<br>
De: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a><br>
[mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a>] En nombre de Nicklas Avén<br>
Enviado el: miércoles, 05 de diciembre de 2012 04:45 p.m.<br>
Para: PostGIS Users Discussion<br>
Asunto: Re: [postgis-users] a long time calculate distance between point and<br>
polygon<br>
<div class="HOEnZb"><div class="h5"><br>
Hallo<br>
<br>
You should use ST_DWithin instead with gist index on your gometry/geography<br>
column:<br>
<br>
select * from pozos p,suelos s where<br>
ST_DWithin(p.the_geom,s.the_geom,1000)<br>
<br>
<br>
HTH<br>
<br>
Nicklas<br>
<br>
<br>
<br>
On Wed, 2012-12-05 at 16:32 -0500, Francisco Salas wrote:<br>
> Hi,<br>
><br>
> I have test in two database one with SRID 2085 an other 4326 use this<br>
> sql<br>
><br>
> pozos : 2339 rows<br>
><br>
> suelos:1526 rows<br>
><br>
> for 2085 :<br>
><br>
> select * from pozos p,suelos s where<br>
> st_distance(p.the_geom,s.the_geom)<br>
><br>
> <=1000<br>
><br>
> time of result : 3 minutes aprox<br>
><br>
><br>
><br>
> for 4326 :<br>
><br>
> select * from pozos p,suelos s where<br>
> st_distance(p.the_geom,s.the_geom,true)<br>
><br>
> <=1000<br>
><br>
> time of result : not determined<br>
><br>
> Why happen this problem?<br>
><br>
> How I can optimize this?<br>
><br>
> I am using PostGis 1.5.2<br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
><br>
> Francisco Salas<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth<br><br>
</div>