Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- osm=> EXPLAIN SELECT id,(SUM_AGG(elev)) AS uphill,MAX(dist),MAX(elev),MIN(elev) FROM ( SELECT * FROM ( SELECT elev,planet.id,ST_Length(planet.line)*ST_Line_Locate_Point(planet.line,(ST_Dump(ST_Intersection(planet.line,the_geom))).geom) As dist FROM contour, ( SELECT * FROM planet_trails_times WHERE id=17528 ) AS planet WHERE ST_Intersects(the_geom,planet.line) ) As f ORDER BY dist ) AS f GROUP BY f.id;
- QUERY PLAN
- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- HashAggregate (cost=6771.19..6775.19 rows=200 width=20)
- -> Sort (cost=6761.86..6762.80 rows=373 width=20)
- Sort Key: ((st_length(planet_trails_times.line) * st_line_locate_point(planet_trails_times.line, (st_dump(st_intersection(planet_trails_times.line, contour.the_geom))).geom)))
- -> Nested Loop (cost=0.00..6742.20 rows=373 width=6459)
- Join Filter: _st_intersects(contour.the_geom, planet_trails_times.line)
- -> Seq Scan on planet_trails_times (cost=0.00..1578.65 rows=98 width=36)
- Filter: (id = 17528)
- -> Index Scan using contour_the_geom_gist on contour (cost=0.00..48.81 rows=11 width=6423)
- Index Cond: (contour.the_geom && planet_trails_times.line)
- (9 rows)
- osm=>
Add Comment
Please, Sign In to add comment