<br><br><div class="gmail_quote">2009/10/1 dassouki <span dir="ltr"><<a href="mailto:dassouki@gmail.com">dassouki@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

/ Hey All,<br>
</blockquote></blockquote><div class="im">
/>>/<br>
/>>/ As some of you know, I've been trying to connect a point from a point table<br>
/>>/ to the projection of that point on the nearest line for close to forever<br>
/>>/ now.<br>
/>>/<br>
/>>/ I've managed to get the code working for a small set of points and lines;<br>
/>>/ however, on a 60 node with 2,000 lines, the query is in its 11th hour and<br>
/>>/ still no sign of ending.<br>
/>>/<br>
/>>/ I posted a question including code on stack overflow<br>
/>>/ <a href="http://stackoverflow.com/questions/1504353/slow-postgres-query" target="_blank">http://stackoverflow.com/questions/1504353/slow-postgres-query</a><br>
/>>/<br>
/>>/ I was wondering if anyone here has any idea on what I might be doing wrong<br>
/>>/ ? and if there is a way to make the code more efficient<br>
/>>/<br>
/>>/<br>
/> Hum, I am no expert but it looks like your 3000000 is way too high. <br></div>
I tried 1, 100, and 10000 and it didn't seem to speed up the query<div class="im"><br></div></blockquote><div><br>Ok but what is your SRID? You have to pick a meaningful value based on your SRID coordinates, with a reasonable amount of slices. It takes a bit of trial of error to find the sweet spot for your dataset.<br>
It depends a lot on the density of points etc... <br></div></div><br>Emilie Laffray<br>