<div dir="ltr">Hello everyone,<div><br></div><div>I have quick questions please about ST_Intersects Vs. ST_Intersection:</div><div><br></div><div><ol><li>Does the following SQL statement checks the intersection between each geom in table1 Vs. each geom in table2?<br>

SELECT ST_Intersection(table1.geom, table2.geom)<br>From table1, table2;<br></li><li>I have 300 lines in table1 and 600 lines in table2. ST_Intersects takes about 10 seconds to run while ST_Intersection takes more than 35 seconds. Isn't both check for intersections first which should take the long time needed?</li>

<li>I am trying to find the intersection points between lines in table1 and table2. What I am doing now is using ST_Intersects in PHP code to collect gids from both tables of the lines that intersects and than ST_Intersections on the gids found from both tables. If someone nows a better solution, can you please advise?</li>


</ol><div><br></div></div><div>Thank you all,</div><div><div dir="ltr"><b style="color:rgb(51,51,153)"><font style="font-family:garamond,serif;color:rgb(51,102,255)"><span style="border-collapse:collapse">---------------------------------------------------------------------------<br>


Ahmad Aburizaiza<br>PhD student at George Mason University<br>Geography and Geoinformation Science Department<br>Fairfax, VA, USA<br>Tel : <a href="tel:%2B1-703-981-0354" value="+17039810354" target="_blank">+1-703-981-0354</a></span></font></b></div>

<br>
</div></div>