explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BRFC

Settings
# exclusive inclusive rows x rows loops node
1. 0.039 4,608.688 ↑ 6.5 31 1

Sort (cost=6,056,515.39..6,056,515.89 rows=200 width=40) (actual time=4,608.686..4,608.688 rows=31 loops=1)

  • Sort Key: tblmovements.commodity
  • Sort Method: quicksort Memory: 27kB
2. 1.264 4,608.649 ↑ 6.5 31 1

HashAggregate (cost=6,056,500.74..6,056,507.74 rows=200 width=40) (actual time=4,608.636..4,608.649 rows=31 loops=1)

  • Group Key: tblmovements.commodity
3. 0.000 4,607.385 ↑ 9,312.3 2,835 1

Group (cost=1,464,135.57..5,264,493.39 rows=26,400,245 width=55) (actual time=3,852.007..4,607.385 rows=2,835 loops=1)

  • Group Key: tblmovements.trip_id, ((v_transit_movement_extras.mov_cst * '2'::double precision)), v_transit_movement_extras.total_km, v_transit_movement_extras.total_hr, v_transit_movement_extras.avg_road_speed
4. 0.000 4,611.603 ↑ 9,011.9 2,835 1

Gather Merge (cost=1,464,135.57..4,615,132.53 rows=25,548,624 width=47) (actual time=3,851.998..4,611.603 rows=2,835 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
5. 1,855.408 16,987.812 ↑ 12,011.6 709 4

Group (cost=1,463,135.53..1,612,169.17 rows=8,516,208 width=47) (actual time=3,604.179..4,246.953 rows=709 loops=4)

  • Group Key: tblmovements.trip_id, ((v_transit_movement_extras.mov_cst * '2'::double precision)), v_transit_movement_extras.total_km, v_transit_movement_extras.total_hr, v_transit_movement_extras.avg_road_speed
6. 4,782.200 15,132.404 ↑ 2.5 3,456,820 4

Sort (cost=1,463,135.53..1,484,426.05 rows=8,516,208 width=47) (actual time=3,604.175..3,783.101 rows=3,456,820 loops=4)

  • Sort Key: tblmovements.trip_id, ((v_transit_movement_extras.mov_cst * '2'::double precision)), v_transit_movement_extras.total_km, v_transit_movement_extras.total_hr, v_transit_movement_extras.avg_road_speed
  • Sort Method: quicksort Memory: 376195kB
  • Worker 0: Sort Method: quicksort Memory: 511096kB
  • Worker 1: Sort Method: quicksort Memory: 439316kB
  • Worker 2: Sort Method: quicksort Memory: 544083kB
7. 3,120.528 10,350.204 ↑ 2.5 3,456,820 4

Parallel Hash Left Join (cost=16,190.91..482,844.21 rows=8,516,208 width=47) (actual time=82.457..2,587.551 rows=3,456,820 loops=4)

  • Hash Cond: (tblsegments.trip_id = v_transit_movement_extras.trip_id)
8. 3,319.828 7,100.672 ↑ 2.5 3,456,820 4

Parallel Hash Join (cost=10,335.19..433,342.60 rows=8,516,208 width=35) (actual time=49.038..1,775.168 rows=3,456,820 loops=4)

  • Hash Cond: (tblsegments.trip_id = tblmovements.trip_id)
9. 1,452.314 3,595.276 ↑ 2.5 3,456,820 4

Nested Loop (cost=184.49..400,836.55 rows=8,516,208 width=16) (actual time=2.023..898.819 rows=3,456,820 loops=4)

10. 4.367 5.372 ↑ 4.4 709 4

Parallel Bitmap Heap Scan on tblsegments tblsegments_1 (cost=183.92..37,087.49 rows=3,136 width=8) (actual time=1.056..1.343 rows=709 loops=4)

  • Recheck Cond: (link_id = 1464746470)
  • Heap Blocks: exact=5
11. 1.005 1.005 ↑ 3.4 2,835 1

Bitmap Index Scan on seglink (cost=0.00..181.49 rows=9,723 width=0) (actual time=1.004..1.005 rows=2,835 loops=1)

  • Index Cond: (link_id = 1464746470)
12. 2,137.590 2,137.590 ↓ 1.8 4,877 2,835

Index Only Scan using idx_tblsegments_keyrev on tblsegments (cost=0.57..89.21 rows=2,678 width=16) (actual time=0.018..0.754 rows=4,877 loops=2,835)

  • Index Cond: (trip_id = tblsegments_1.trip_id)
  • Heap Fetches: 0
13. 95.260 185.568 ↑ 1.7 75,192 4

Parallel Hash (cost=8,584.20..8,584.20 rows=125,320 width=27) (actual time=46.391..46.392 rows=75,192 loops=4)

  • Buckets: 524288 Batches: 1 Memory Usage: 23808kB
14. 90.308 90.308 ↑ 1.7 75,192 4

Parallel Seq Scan on tblmovements (cost=0.00..8,584.20 rows=125,320 width=27) (actual time=0.464..22.577 rows=75,192 loops=4)

15. 75.516 129.004 ↑ 2.4 74,662 4

Parallel Hash (cost=3,659.76..3,659.76 rows=175,676 width=24) (actual time=32.251..32.251 rows=74,662 loops=4)

  • Buckets: 524288 Batches: 1 Memory Usage: 20512kB
16. 53.488 53.488 ↑ 2.4 74,662 4

Parallel Seq Scan on v_transit_movement_extras (cost=0.00..3,659.76 rows=175,676 width=24) (actual time=1.088..13.372 rows=74,662 loops=4)