<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:ns0="urn:schemas-microsoft-com:office:smarttags">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have a point table which contains 300 millions of records.
I am using following query to fetch the records from the table within certain
radius. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Select *<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> from table<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> where<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> st_dwithin(<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> transform(the_geom,2163),<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> transform(GeomFromText('POINT(-122.0527
37.323)',4326),2163),<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> 1000<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> );<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>But it takes long time to get the result. I am seeking help.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks & Regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>Santosh Gaikwad</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>Senior Software Developer</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=black face="Times New Roman"><span
style='font-size:10.0pt;color:black'>Saama Technologies (</span></font><font
size=2><span style='font-size:10.0pt'><ns0:place w:insAuthor="sgaikwad"
w:insDate="2007-11-20T14:06:00Z" w:endInsAuthor="sgaikwad"
w:endInsDate="2007-11-20T14:06:00Z"><ns0:country-region w:insAuthor="sgaikwad"
w:insDate="2007-11-20T14:06:00Z" w:endInsAuthor="sgaikwad"
w:endInsDate="2007-11-20T14:06:00Z"><st1:country-region w:st="on"><st1:place
w:st="on"><font color=black><span style='color:black'>India</span></font></st1:place></st1:country-region></ns0:country-region></ns0:place><font
color=black><span style='color:black'>) Pvt. Ltd.,<br>
</span></font>Unit No.101-102, First floor,<br>
Weikfield IT CITI INFO PARK, <br>
Weikfield estates, <br>
<st1:Street w:st="on"><st1:address w:st="on">Pune Nagar Road</st1:address></st1:Street>,<br>
Pune - 411 014. </span></font><font size=2><span lang=FR style='font-size:10.0pt'>India<br>
Phone : +91 20 66071397</span></font><span lang=FR><o:p></o:p></span></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=FR
style='font-size:10.0pt'>Mobile: +91-9422005927<br>
E-mail :Santosh.Gaikwad@saama.com</span></font><span lang=FR><o:p></o:p></span></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><a href="http://www.saama.com"><span lang=FR>http://www.saama.com</span></a></span></font><span
lang=FR><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=FR
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>