<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD><TITLE>postgis-users Digest, Vol 59, Issue 22</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>Florian,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>I'm not too familiar with Germany spatial ref systems so
maybe some postgis user in Germany would be best able to help you on that.
My guess is an SRID between 31466 and 312469 may work for you - below is
the query to see the descriptions of these)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>SELECT * FROM spatial_ref_sys WHERE srid between 31466 and
31469</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>Now for transforming your data. I your SRID of your
existing data is -1 instead something like say 4326 (longlat WGS 84) then
you need to force it into the right SRID using ST_SetSRID and then
transform.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>Let us say for example you made the mistake of importing
your data with SRID -1 -> Then to remedy the situation , you would do the
following. The below assumes 31466 is the projection you have decided for
your data.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>SELECT AddGeometryColumn('public', '<FONT
color=#000000>navteq_poi', 'the_geom_germany', 31466, 'POINT',
2);</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2>UPDATE navteq_poi SET the_geom_germany =
ST_Transform(ST_SetSRID(the_geom, 4326), 31466);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2>CREATE INDEX idx_navteq_poi_the_geom_germany ON parceltime_2006
USING gist (the_geom_germany);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>If your SRID is already something other than -1, then you
can simply replace the second line with </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>UPDATE navteq_poi SET
the_geom_germany = ST_Transform(the_geom,31466);</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>Optionally if you don't need
the old geom field for anything else, you can drop your original geom field with
a </FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>SELECT
DropGeometryColumn('public', 'navteq_poi',
'the_geom');</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>Repeat the above process for
your line table except of course replacing POINT with LINESTRING or whatever
your current type is for the_geom.</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2>Now looking at the below plan, it looks like you may be missing a couple
of useful indexes. Make sure you have btree indexes on the following
fields</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2>navteq_poi.poi_name</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2>navteq_poi .poi_id</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN> </DIV></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>Then do a <STRONG>vacuum
analyze</STRONG></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>Then from there you can simply
use </FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>for older
postgis</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>(Expand(point.the_geom_germany,
50) && line.the_geom_germany) AND Distance(point.the_geom_germany,
line.the_geom_germany) < 50</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial size=2>If you are using the newer
version of Postgis (1.3.1) then you can simplify the above further
with</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2>ST_DWithin(point.the_geom_germany, line.the_geom_germany,
50)</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2><STRONG>(Note if you are using an older version of postgis, you may have
to remove the ST_ from above and ST_DWithin may not
exist)</STRONG></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><STRONG><FONT face=Arial
size=2></FONT></STRONG></SPAN> </DIV></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><SPAN
class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=929465112-25092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Reichle, Florian<BR><B>Sent:</B> Tuesday, September 25, 2007 4:48
AM<BR><B>To:</B> postgis-users@postgis.refractions.net<BR><B>Subject:</B> RE:
Question: How can I improve the performance of function
DISTANCE_SPHERE?<BR></FONT><BR></DIV>
<DIV></DIV>
<P><FONT size=2><EM>Does it cover the whole world or just a<BR>limited region
like a country?</EM><BR>--> As an eample take Germany as
country<BR><BR><EM>If you can transform to a meter based<BR>projection, that
would be the most efficient.<BR></EM>--> How can I do this?<BR><BR>My EXPLAIN
SELECT:<BR>
<TABLE class=MsoNormalTable
style="MARGIN: auto auto auto 2.85pt; WIDTH: 1485.95pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 3.5pt 0cm 3.5pt"
cellSpacing=0 cellPadding=0 width=1981 border=0>
<TBODY>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 0">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">QUERY
PLAN<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 1">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Unique<SPAN
style="mso-spacerun: yes"> </SPAN>(cost=18858475.73..18858492.79
rows=4 width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 2">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes"> </SPAN>-><SPAN
style="mso-spacerun: yes"> </SPAN>Group<SPAN
style="mso-spacerun: yes"> </SPAN>(cost=18858475.73..18858492.77
rows=4 width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 3">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>-><SPAN style="mso-spacerun: yes"> </SPAN>Merge Left
Join<SPAN style="mso-spacerun: yes">
</SPAN>(cost=18858475.73..18858492.75 rows=4
width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 4">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Merge Cond: (("outer"."?column3?" = "inner"."?column3?")
</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">AND (point.poi_id
= point.poi_id))<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 5">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Filter: (point.poi_name IS NULL)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 6">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-><SPAN
style="mso-spacerun: yes"> </SPAN>Sort<SPAN
style="mso-spacerun: yes"> </SPAN>(cost=86.94..89.03 rows=836
width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 7">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Sort Key: (point.poi_name)::text,
point.poi_id<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 8">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>-><SPAN style="mso-spacerun: yes"> </SPAN>Seq Scan on
navteq_poi point<SPAN style="mso-spacerun: yes">
</SPAN>(cost=0.00..46.36 rows=836 width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 9">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-><SPAN
style="mso-spacerun: yes"> </SPAN>Sort<SPAN
style="mso-spacerun: yes"> </SPAN>(cost=18858388.80..18858392.28
rows=1394 width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 10">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Sort Key: (point.poi_name)::text,
point.poi_id<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 11">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>-><SPAN
style="mso-spacerun: yes"> </SPAN>Nested </SPAN><st1:place><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB">Loop</SPAN></st1:place><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes"> </SPAN>(cost=47.20..18858316.00 rows=1394
width=39)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 12">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Join Filter: ((expand(line.the_geom, 0.01::double precision)
&& point.the_geom) AND ((distance_spheroid(point.the_geom,
startpoint(line.the_geom), 'SPHEROID("WGS
84",6378137,298.257223563)'::spheroid) < 50::double precision) OR
(distance_spheroid(point.the_geom, centroid(line.the_geom), 'SPHEROID("WGS
84",6378137,298.257223563)'::spheroid) < 50::double precision) OR
(distance_spheroid(point.the_geom, endpoint(line.the_geom), 'SPHEROID("WGS
84",6378137,298.257223563)'::spheroid) < 50::double
precision)))<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 13">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>-><SPAN style="mso-spacerun: yes"> </SPAN>Seq Scan on
navteq_streets line<SPAN style="mso-spacerun: yes">
</SPAN>(cost=0.00..43075.15 rows=473815
width=85)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 14">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-><SPAN
style="mso-spacerun: yes"> </SPAN>Materialize<SPAN
style="mso-spacerun: yes"> </SPAN>(cost=47.20..55.56 rows=836
width=71)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 15; mso-yfti-lastrow: yes">
<TD
style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3.5pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3.5pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 1485.95pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent"
vAlign=bottom noWrap width=1981>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>-><SPAN style="mso-spacerun: yes"> </SPAN>Seq Scan on
navteq_poi point<SPAN style="mso-spacerun: yes">
</SPAN>(cost=0.00..46.36 rows=836 width=71)<BR><BR>The EXPLAIN ANALYZE
took to long. So I hope the information will
help.<BR><BR>Thanks</SPAN></P></TD></TR></TBODY></TABLE><BR> </FONT></P></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>