I have a table containing all roads in the US. Naturally, this table is very large with more that 20 million rows. I want to find the intersection of these roads with a single linestring (representing a pipeline). <br><br>
SELECT ST_AsText(ST_Intersection(<br>    (SELECT the_geom FROM roads)<br>    (SELECT the_geom FROM pipes WHERE pipeid = 1)));<br><br>I have created a gist index on roads but the query planner does not use it. The query takes a really long time. Is there some way to optimize this?<br>
<br>thanks,<br>Vinod.<br>