Skip to content

Instantly share code, notes, and snippets.

@jmealo
Created April 23, 2013 18:00
Show Gist options
  • Save jmealo/5445880 to your computer and use it in GitHub Desktop.
Save jmealo/5445880 to your computer and use it in GitHub Desktop.
sw=# EXPLAIN ANALYZE SELECT ST_Distance(ST_Transform(ST_GeomFromText('POINT(-75.211457 39.956314)', 4326), 900913), planet_osm_line.way) AS planar_degrees, name FROM planet_osm_line ORDER BY planar_degrees ASC LIMIT 2;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Limit (cost=4719.15..4719.15 rows=2 width=600) (actual time=39.156..39.157 rows=2 loops=1)
-> Sort (cost=4719.15..4758.76 rows=15845 width=600) (actual time=39.154..39.154 rows=2 loops=1)
Sort Key: (st_distance('010100002031BF0D005777154645F05FC15B189DFEB2895241'::geometry, way))
Sort Method: top-N heapsort Memory: 25kB
-> Seq Scan on planet_osm_line (cost=0.00..4560.70 rows=15845 width=600) (actual time=0.028..33.340 rows=15845 loops=1)
Total runtime: 39.186 ms
(6 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment