<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: Î¢ÈíÑźÚ; COLOR: #000000; FONT-SIZE: 10.5pt
}
</STYLE>

<META name=GENERATOR content="MSHTML 9.00.8112.16441"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>hi</DIV>
<DIV>I have over 8500000 records in the postgresql and every record has a 
geom column what is store a point.</DIV>
<DIV>I get a point <SPAN class=keyword>coordinate(eg 116.1124,39.9046 
)</SPAN><SPAN class=phonetic> and I want to know the <SPAN 
class=keyword>coordinates</SPAN><SPAN class=phonetic> of db points which is 
in 500m range.</SPAN></SPAN></DIV>
<DIV><SPAN class=phonetic><SPAN class=phonetic></SPAN></SPAN> </DIV>
<DIV><SPAN class=phonetic><SPAN class=phonetic>I use </DIV>
<DIV style="COLOR: #3366ff">ST_Distance(</DIV>
<DIV style="COLOR: #3366ff">the_geom,</DIV>
<DIV style="COLOR: #3366ff">'srid=4326;point(116.1124 39.9046)'</DIV>
<DIV style="COLOR: #3366ff">) <= 500</DIV>
<DIV>but the query is very slow(about take 15s)</DIV>
<DIV> </DIV>
<DIV>Is there some another way can do fast ?</DIV></SPAN></SPAN><SPAN 
class=phonetic></SPAN>
<DIV> </DIV>
<HR style="WIDTH: 210px; HEIGHT: 1px" align=left color=#b5c4df SIZE=1>

<DIV><SPAN>superman0920</SPAN></DIV></BODY></HTML>