explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VqyX

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 95.933 ↑ 200.0 1 1

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

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

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

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

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

  • Group Key: tblmovements.trip_id
4. 20.556 99.966 ↑ 902,304.0 1 1

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

  • Workers Planned: 3
  • Workers Launched: 3
5. 1.838 79.410 ↓ 0.0 0 4

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

  • Group Key: tblmovements.trip_id
6. 1.242 77.572 ↑ 135,177.9 63 4

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

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

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

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

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

9. 0.028 0.045 ↓ 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.044..0.045 rows=0 loops=4)

  • Recheck Cond: (link_id = 1201733555)
  • Heap Blocks: exact=1
10. 0.017 0.017 ↑ 9,723.0 1 1

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

  • Index Cond: (link_id = 1201733555)
11. 0.082 0.082 ↑ 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.019..0.082 rows=252 loops=1)

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

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

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

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

14. 19.414 29.925 ↑ 2.4 74,662 4

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

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