explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W7L3

Settings
# exclusive inclusive rows x rows loops node
1. 0.037 5,501.090 ↑ 6.5 31 1

Sort (cost=889,966.35..889,966.85 rows=200 width=40) (actual time=5,501.088..5,501.090 rows=31 loops=1)

  • Sort Key: tblmovements.commodity
  • Sort Method: quicksort Memory: 27kB
2. 1.010 5,501.053 ↑ 6.5 31 1

HashAggregate (cost=889,951.21..889,958.71 rows=200 width=40) (actual time=5,501.041..5,501.053 rows=31 loops=1)

  • Group Key: tblmovements.commodity
3. 1.271 5,500.043 ↑ 106.1 2,835 1

Finalize HashAggregate (cost=871,905.13..880,928.17 rows=300,768 width=68) (actual time=5,497.053..5,500.043 rows=2,835 loops=1)

  • Group Key: tblmovements.trip_id
4. 378.365 5,498.772 ↑ 318.3 2,835 1

Gather (cost=760,620.97..853,859.05 rows=902,304 width=240) (actual time=4,701.040..5,498.772 rows=2,835 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
5. 2,354.213 5,120.407 ↑ 424.2 709 4

Partial HashAggregate (cost=759,620.97..762,628.65 rows=300,768 width=240) (actual time=5,118.199..5,120.407 rows=709 loops=4)

  • Group Key: tblmovements.trip_id
6. 805.819 2,766.194 ↑ 2.5 3,456,820 4

Parallel Hash Left Join (cost=16,190.91..461,553.69 rows=8,516,208 width=43) (actual time=82.636..2,766.194 rows=3,456,820 loops=4)

  • Hash Cond: (tblsegments.trip_id = v_transit_movement_extras.trip_id)
7. 864.253 1,927.535 ↑ 2.5 3,456,820 4

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

  • Hash Cond: (tblsegments.trip_id = tblmovements.trip_id)
8. 1,014.853 1,016.658 ↑ 2.5 3,456,820 4

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

9. 0.309 0.952 ↑ 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=0.698..0.952 rows=709 loops=4)

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

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

  • Index Cond: (link_id = 1464746470)
11. 0.853 0.853 ↓ 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.017..0.853 rows=4,877 loops=2,835)

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

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

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

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

14. 20.061 32.840 ↑ 2.4 74,662 4

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

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