explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4gLq

Settings
# exclusive inclusive rows x rows loops node
1. 7.837 252,919.219 ↑ 1.0 1 1

Aggregate (cost=6,670.14..6,670.15 rows=1 width=32) (actual time=252,919.219..252,919.219 rows=1 loops=1)

2. 1.595 252,911.382 ↓ 417.0 417 1

Subquery Scan on q (cost=6,632.54..6,670.13 rows=1 width=44) (actual time=234,372.350..252,911.382 rows=417 loops=1)

3. 18,226.834 252,909.787 ↓ 417.0 417 1

GroupAggregate (cost=6,632.54..6,670.12 rows=1 width=254) (actual time=234,372.330..252,909.787 rows=417 loops=1)

  • Group Key: v_transit_roads.link_id, v_transit_roads.street_name, v_transit_roads.road_speed, v_transit_roads.road_rank, v_transit_roads.truck, v_transit_roads.surface, v_transit_roads.road_km, v_transit_roads.geometry
4.          

CTE boundaries

5. 0.000 0.000 ↓ 0.0 0

Seq Scan on v_transit_boundaries (cost=0.00..910.46 rows=3,346 width=75,373) (never executed)

6. 6,379.105 234,682.953 ↓ 5,599.9 3,819,120 1

Sort (cost=5,722.08..5,723.79 rows=682 width=210) (actual time=234,365.813..234,682.953 rows=3,819,120 loops=1)

  • Sort Key: v_transit_roads.link_id, v_transit_roads.street_name, v_transit_roads.road_speed, v_transit_roads.road_rank, v_transit_roads.truck, v_transit_roads.surface, v_transit_roads.road_km, v_transit_roads.geometry
  • Sort Method: quicksort Memory: 1212089kB
7. 1,735.538 228,303.848 ↓ 5,599.9 3,819,120 1

Nested Loop Left Join (cost=5.73..5,689.98 rows=682 width=210) (actual time=32.130..228,303.848 rows=3,819,120 loops=1)

  • Join Filter: NULL::boolean
8. 4,211.586 226,568.310 ↓ 5,599.9 3,819,120 1

Nested Loop Left Join (cost=5.73..5,683.16 rows=682 width=210) (actual time=32.127..226,568.310 rows=3,819,120 loops=1)

9. 688.010 210,899.364 ↓ 5,599.9 3,819,120 1

Nested Loop (cost=5.31..463.10 rows=682 width=194) (actual time=32.077..210,899.364 rows=3,819,120 loops=1)

10. 41.986 42.103 ↓ 417.0 417 1

Bitmap Heap Scan on v_transit_roads (cost=4.73..174.86 rows=1 width=186) (actual time=0.308..42.103 rows=417 loops=1)

  • Recheck Cond: ((street_name)::text = ANY ('{"Gore Hwy"}'::text[]))
  • Filter: ((geometry && '0103000020110F00000100000005000000EC511814C3F26F41CDCCCC56F6E247C1EC511814C3F26F410AD723DBB51449C13D0A977A991F70410AD723DBB51449C13D0A977A991F7041CDCCCC56F6E247C1EC511814C3F26F41CDCCCC56F6E247C1'::geometry) AND _st_intersects(geometry, '0103000020110F00000100000005000000EC511814C3F26F41CDCCCC56F6E247C1EC511814C3F26F410AD723DBB51449C13D0A977A991F70410AD723DBB51449C13D0A977A991F7041CDCCCC56F6E247C1EC511814C3F26F41CDCCCC56F6E247C1'::geometry))
  • Rows Removed by Filter: 32
  • Heap Blocks: exact=119
11. 0.117 0.117 ↓ 11.0 449 1

Bitmap Index Scan on idx_v_transit_roads_street_name (cost=0.00..4.73 rows=41 width=0) (actual time=0.117..0.117 rows=449 loops=1)

  • Index Cond: ((street_name)::text = ANY ('{"Gore Hwy"}'::text[]))
12. 210,169.251 210,169.251 ↓ 1.8 9,159 417

Index Only Scan using idx_road_segments_key on road_segments (cost=0.57..236.00 rows=5,224 width=16) (actual time=7.322..504.003 rows=9,159 loops=417)

  • Index Cond: (link_id = v_transit_roads.link_id)
  • Heap Fetches: 0
13. 11,457.360 11,457.360 ↑ 1.0 1 3,819,120

Index Scan using trip on road_movements (cost=0.42..7.65 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=3,819,120)

  • Index Cond: (road_segments.trip_id = trip_id)
14. 0.000 0.000 ↓ 0.0 0 3,819,120

Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.000..0.000 rows=0 loops=3,819,120)

  • One-Time Filter: false
Planning time : 137.255 ms