explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wI8C

Settings
# exclusive inclusive rows x rows loops node
1. 414.281 25,371.265 ↓ 18.3 38,932 1

Merge Join (cost=15,917,690.86..15,920,624.84 rows=2,125 width=304) (actual time=24,756.997..25,371.265 rows=38,932 loops=1)

  • Merge Cond: (road_segments.trip_id = road_movements.trip_id)
2. 5,721.333 24,925.571 ↓ 4.7 2,746,691 1

Sort (cost=15,910,993.32..15,912,441.78 rows=579,383 width=195) (actual time=24,088.731..24,925.571 rows=2,746,691 loops=1)

  • Sort Key: road_segments.trip_id
  • Sort Method: external merge Disk: 466880kB
3. 862.395 19,204.238 ↓ 4.8 2,799,258 1

Nested Loop (cost=187.26..15,744,633.32 rows=579,383 width=195) (actual time=1.536..19,204.238 rows=2,799,258 loops=1)

4. 52.697 53.255 ↓ 3.4 2,881 1

Bitmap Heap Scan on v_transit_roads (cost=91.63..8,373.54 rows=850 width=187) (actual time=0.755..53.255 rows=2,881 loops=1)

  • Recheck Cond: (geometry && '0103000020110F000001000000050000008FC2B976272970415C8FE237662F48C18FC2B97627297041EC51F818D67B48C1E17ADC72B5327041EC51F818D67B48C1E17ADC72B53270415C8FE237662F48C18FC2B976272970415C8FE237662F48C1'::geometry)
  • Filter: _st_intersects(geometry, '0103000020110F000001000000050000008FC2B976272970415C8FE237662F48C18FC2B97627297041EC51F818D67B48C1E17ADC72B5327041EC51F818D67B48C1E17ADC72B53270415C8FE237662F48C18FC2B976272970415C8FE237662F48C1'::geometry)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=599
5. 0.558 0.558 ↓ 1.1 2,882 1

Bitmap Index Scan on v_transit_roads_geometry_geom_idx (cost=0.00..91.42 rows=2,551 width=0) (actual time=0.558..0.558 rows=2,882 loops=1)

  • Index Cond: (geometry && '0103000020110F000001000000050000008FC2B976272970415C8FE237662F48C18FC2B97627297041EC51F818D67B48C1E17ADC72B5327041EC51F818D67B48C1E17ADC72B53270415C8FE237662F48C18FC2B976272970415C8FE237662F48C1'::geometry)
6. 17,697.983 18,288.588 ↑ 5.2 972 2,881

Bitmap Heap Scan on road_segments (cost=95.63..18,462.60 rows=5,065 width=16) (actual time=0.380..6.348 rows=972 loops=2,881)

  • Recheck Cond: (link_id = v_transit_roads.link_id)
  • Heap Blocks: exact=2799258
7. 590.605 590.605 ↑ 5.2 972 2,881

Bitmap Index Scan on idx_road_segments_link_id (cost=0.00..94.36 rows=5,065 width=0) (actual time=0.205..0.205 rows=972 loops=2,881)

  • Index Cond: (link_id = v_transit_roads.link_id)
8. 1.871 31.413 ↓ 1.1 2,367 1

Sort (cost=6,697.53..6,702.87 rows=2,137 width=117) (actual time=31.042..31.413 rows=2,367 loops=1)

  • Sort Key: road_movements.trip_id
  • Sort Method: quicksort Memory: 725kB
9. 29.130 29.542 ↓ 1.1 2,367 1

Bitmap Heap Scan on road_movements (cost=40.99..6,579.34 rows=2,137 width=117) (actual time=0.635..29.542 rows=2,367 loops=1)

  • Recheck Cond: (commod_id = 3)
  • Heap Blocks: exact=1220
10. 0.412 0.412 ↓ 1.1 2,367 1

Bitmap Index Scan on idx_road_movements_commod_id (cost=0.00..40.45 rows=2,137 width=0) (actual time=0.412..0.412 rows=2,367 loops=1)

  • Index Cond: (commod_id = 3)
Planning time : 5.900 ms