<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Texto sin formato Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
span.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TextosinformatoCar
{mso-style-name:"Texto sin formato Car";
mso-style-priority:99;
mso-style-link:"Texto sin formato";
font-family:"Calibri","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES-MX link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText><span lang=EN-US>Hi, <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>I have test in two database one with SRID 2085 an other 4326 use this sql <o:p></o:p></span></p><p class=MsoPlainText>pozos : 2339 rows <o:p></o:p></p><p class=MsoPlainText>suelos:1526 rows<o:p></o:p></p><p class=MsoPlainText>for 2085 : <o:p></o:p></p><p class=MsoPlainText><span lang=EN-US>select * from pozos p,suelos s where st_distance(p.the_geom,s.the_geom)<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><=1000 <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>time of result : 3 minutes aprox <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US> for 4326 : <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>select * from pozos p,suelos s where st_distance(p.the_geom,s.the_geom,true)<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><=1000 <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>time of result : not determined <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>Why happen this problem? <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>How I can optimize this? <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>I am using PostGis 1.5.2<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US> Regards,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText>Francisco Salas <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>