explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gig

Settings
# exclusive inclusive rows x rows loops node
1. 852.658 21,569.620 ↓ 9.3 36,284 1

Merge Join (cost=15,810,979.07..15,813,943.84 rows=3,882 width=304) (actual time=20,825.093..21,569.620 rows=36,284 loops=1)

  • Merge Cond: (road_segments.trip_id = road_movements.trip_id)
2. 2,947.642 20,125.187 ↓ 4.7 2,746,691 1

Sort (cost=15,800,092.32..15,801,540.78 rows=579,383 width=195) (actual time=19,481.298..20,125.187 rows=2,746,691 loops=1)

  • Sort Key: road_segments.trip_id
  • Sort Method: quicksort Memory: 772445kB
3. 850.391 17,177.545 ↓ 4.8 2,799,258 1

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

4. 54.470 55.266 ↓ 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.984..55.266 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.796 0.796 ↓ 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.795..0.796 rows=2,882 loops=1)

  • Index Cond: (geometry && '0103000020110F000001000000050000008FC2B976272970415C8FE237662F48C18FC2B97627297041EC51F818D67B48C1E17ADC72B5327041EC51F818D67B48C1E17ADC72B53270415C8FE237662F48C18FC2B976272970415C8FE237662F48C1'::geometry)
6. 15,718.736 16,271.888 ↑ 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.366..5.648 rows=972 loops=2,881)

  • Recheck Cond: (link_id = v_transit_roads.link_id)
  • Heap Blocks: exact=2799258
7. 553.152 553.152 ↑ 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.192..0.192 rows=972 loops=2,881)

  • Index Cond: (link_id = v_transit_roads.link_id)
8. 6.456 591.775 ↓ 1.1 4,113 1

Sort (cost=10,886.73..10,896.49 rows=3,904 width=117) (actual time=591.085..591.775 rows=4,113 loops=1)

  • Sort Key: road_movements.trip_id
  • Sort Method: quicksort Memory: 1285kB
9. 551.041 585.319 ↓ 1.1 4,113 1

Bitmap Heap Scan on road_movements (cost=74.68..10,653.84 rows=3,904 width=117) (actual time=72.143..585.319 rows=4,113 loops=1)

  • Recheck Cond: (commod_id = 2)
  • Heap Blocks: exact=2378
10. 34.278 34.278 ↓ 1.1 4,113 1

Bitmap Index Scan on idx_road_movements_commod_id (cost=0.00..73.70 rows=3,904 width=0) (actual time=34.278..34.278 rows=4,113 loops=1)

  • Index Cond: (commod_id = 2)
Planning time : 6.976 ms