explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bfk2

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 99.369 ↑ 200.0 1 1

Sort (cost=889,966.35..889,966.85 rows=200 width=40) (actual time=99.369..99.369 rows=1 loops=1)

  • Sort Key: tblmovements.commodity
  • Sort Method: quicksort Memory: 25kB
2. 0.011 99.362 ↑ 200.0 1 1

HashAggregate (cost=889,951.21..889,958.71 rows=200 width=40) (actual time=99.361..99.362 rows=1 loops=1)

  • Group Key: tblmovements.commodity
3. 0.000 99.351 ↑ 300,768.0 1 1

Finalize HashAggregate (cost=871,905.13..880,928.17 rows=300,768 width=68) (actual time=98.028..99.351 rows=1 loops=1)

  • Group Key: tblmovements.trip_id
4. 31.969 113.102 ↑ 902,304.0 1 1

Gather (cost=760,620.97..853,859.05 rows=902,304 width=240) (actual time=94.854..113.102 rows=1 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
5. 1.830 81.133 ↓ 0.0 0 4

Partial HashAggregate (cost=759,620.97..762,628.65 rows=300,768 width=240) (actual time=80.946..81.133 rows=0 loops=4)

  • Group Key: tblmovements.trip_id
6. 1.272 79.303 ↑ 135,177.9 63 4

Parallel Hash Left Join (cost=16,190.91..461,553.69 rows=8,516,208 width=43) (actual time=78.889..79.303 rows=63 loops=4)

  • Hash Cond: (tblsegments.trip_id = v_transit_movement_extras.trip_id)
7. 0.806 47.794 ↑ 135,177.9 63 4

Parallel Hash Join (cost=10,335.19..433,342.60 rows=8,516,208 width=35) (actual time=47.561..47.794 rows=63 loops=4)

  • Hash Cond: (tblsegments.trip_id = tblmovements.trip_id)
8. 0.000 0.231 ↑ 135,177.9 63 4

Nested Loop (cost=184.49..400,836.55 rows=8,516,208 width=16) (actual time=0.193..0.231 rows=63 loops=4)

9. 0.026 0.083 ↓ 0.0 0 4

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

  • Recheck Cond: (link_id = 1201733555)
10. 0.057 0.057 ↑ 9,723.0 1 1

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

  • Index Cond: (link_id = 1201733555)
11. 0.555 0.555 ↑ 10.6 252 1

Index Only Scan using idx_tblsegments_keyrev on tblsegments (cost=0.57..89.21 rows=2,678 width=16) (actual time=0.432..0.555 rows=252 loops=1)

  • Index Cond: (trip_id = tblsegments_1.trip_id)
  • Heap Fetches: 0
12. 24.039 46.757 ↑ 1.7 75,192 4

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

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

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

14. 19.572 30.237 ↑ 2.4 74,662 4

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

  • Buckets: 524288 Batches: 1 Memory Usage: 20512kB
15. 10.665 10.665 ↑ 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=0.012..10.665 rows=74,662 loops=4)