Nov 10th, 2015
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. EXPLAIN analyze SELECT ST_AsBinary("way") AS geom,"highway","railway" FROM (SELECT way,highway,
  2.            CASE WHEN tunnel IN ('yes','true','1') THEN 'yes'::text ELSE tunnel END AS tunnel,
  3.            CASE WHEN railway='preserved' AND service IN ('spur','siding','yard') THEN 'INT-preserved-ssy'::text ELSE railway END AS railway
  4.            FROM planet_osm_roads
  5.            WHERE highway IS NOT NULL
  6.               OR (railway IS NOT NULL AND railway!='preserved' AND (service IS NULL OR service NOT IN ('spur','siding','yard')))
  7.               OR railway='preserved'
  8.            ORDER BY z_order
  9.           ) AS roads WHERE "way" && ST_SetSRID('BOX3D(-136.4062500000068 39.90973623433025,-111.0937499999932 56.55948248355774)'::box3d, 4326)
  11. Subquery Scan ON roads  (cost=627415.19..634464.81 ROWS=128175 width=633) (actual TIME=430.464..574.934 ROWS=121562 loops=1)
  12.   ->  Sort  (cost=627415.19..627735.62 ROWS=128175 width=619) (actual TIME=430.433..461.885 ROWS=121562 loops=1)
  13.         Sort KEY: planet_osm_roads.z_order
  14.         Sort Method: quicksort  Memory: 55454kB
  15.         ->  Bitmap Heap Scan ON planet_osm_roads  (cost=36126.36..616540.98 ROWS=128175 width=619) (actual TIME=55.172..337.414 ROWS=121562 loops=1)
  16.               Recheck Cond: (way && '0103000020E61000000100000005000000EF000000000D61C0A237A73C72F44340EF000000000D61C05DC83C1F9D474C4021FEFFFFFFC55BC05DC83C1F9D474C4021FEFFFFFFC55BC0A237A73C72F44340EF000000000D61C0A237A73C72F44340'::geometry)
  17.               FILTER: ((highway IS NOT NULL) OR ((railway IS NOT NULL) AND (railway <> 'preserved'::text) AND ((service IS NULL) OR (service <> ALL ('{spur,siding,yard}'::text[])))) OR (railway = 'preserved'::text))
  18.               ROWS Removed BY FILTER: 26972
  19.               ->  Bitmap INDEX Scan ON planet_osm_roads_index  (cost=0.00..36094.31 ROWS=173586 width=0) (actual TIME=37.131..37.131 ROWS=148534 loops=1)
  20.                     INDEX Cond: (way && '0103000020E61000000100000005000000EF000000000D61C0A237A73C72F44340EF000000000D61C05DC83C1F9D474C4021FEFFFFFFC55BC05DC83C1F9D474C4021FEFFFFFFC55BC0A237A73C72F44340EF000000000D61C0A237A73C72F44340'::geometry)
  21. Total runtime: 599.185 ms
RAW Paste Data