<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" 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.16443"></HEAD>
<BODY style="MARGIN: 10px">
<DIV dir=ltr align=left><FONT size=2 face=微软雅黑><A 
href="http://www.postgis.org/documentation/manual-svn/ST_DWithin.html">http://www.postgis.org/documentation/manual-svn/ST_DWithin.html</A></FONT></DIV><FONT 
size=2 face=微软雅黑></FONT><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> 
  postgis-users-bounces@postgis.refractions.net 
  [mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
  </B>superman0920<BR><B>Sent:</B> Friday, May 04, 2012 10:11 PM<BR><B>To:</B> 
  postgis-users<BR><B>Subject:</B> [postgis-users] about range 
  query<BR></FONT><BR></DIV>
  <DIV></DIV>
  <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></BLOCKQUOTE></BODY></HTML>