explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CXUW

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

Sort (cost=985,090.56..985,091.06 rows=200 width=40) (actual time=81.276..81.276 rows=1 loops=1)

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

HashAggregate (cost=985,075.42..985,082.92 rows=200 width=40) (actual time=81.268..81.269 rows=1 loops=1)

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

Finalize HashAggregate (cost=967,029.34..976,052.38 rows=300,768 width=68) (actual time=79.949..81.258 rows=1 loops=1)

  • Group Key: tblmovements.trip_id
4. 14.744 82.525 ↑ 601,536.0 1 1

Gather (cost=891,837.34..954,998.62 rows=601,536 width=240) (actual time=76.555..82.525 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 1.816 67.781 ↓ 0.0 0 3

Partial HashAggregate (cost=890,837.34..893,845.02 rows=300,768 width=240) (actual time=67.481..67.781 rows=0 loops=3)

  • Group Key: tblmovements.trip_id
6. 1.612 65.965 ↑ 130,953.6 84 3

Parallel Hash Left Join (cost=6,300.54..505,833.77 rows=11,000,102 width=43) (actual time=57.859..65.965 rows=84 loops=3)

  • Hash Cond: (tblsegments.trip_id = v_transit_movement_extras.trip_id)
7. 0.000 25.795 ↑ 130,953.6 84 3

Nested Loop (cost=444.83..471,102.37 rows=11,000,102 width=35) (actual time=17.710..25.795 rows=84 loops=3)

8. 10.601 25.761 ↓ 0.0 0 3

Hash Join (cost=444.26..9,357.43 rows=4,051 width=35) (actual time=17.703..25.761 rows=0 loops=3)

  • Hash Cond: (tblmovements.trip_id = tblsegments_1.trip_id)
9. 14.846 14.846 ↑ 1.2 100,256 3

Parallel Seq Scan on tblmovements (cost=0.00..8,584.20 rows=125,320 width=27) (actual time=0.216..14.846 rows=100,256 loops=3)

10. 0.005 0.314 ↑ 9,723.0 1 3

Hash (cost=322.72..322.72 rows=9,723 width=8) (actual time=0.313..0.314 rows=1 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 129kB
11. 0.309 0.309 ↑ 9,723.0 1 3

Index Only Scan using idx_tblsegments_key on tblsegments tblsegments_1 (cost=0.57..322.72 rows=9,723 width=8) (actual time=0.308..0.309 rows=1 loops=3)

  • Index Cond: (link_id = 1201733555)
  • Heap Fetches: 0
12. 0.069 0.069 ↑ 10.6 252 1

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

  • Index Cond: (trip_id = tblmovements.trip_id)
  • Heap Fetches: 0
13. 24.733 38.558 ↑ 1.8 99,550 3

Parallel Hash (cost=3,659.76..3,659.76 rows=175,676 width=24) (actual time=38.557..38.558 rows=99,550 loops=3)

  • Buckets: 524288 Batches: 1 Memory Usage: 20512kB
14. 13.825 13.825 ↑ 1.8 99,550 3

Parallel Seq Scan on v_transit_movement_extras (cost=0.00..3,659.76 rows=175,676 width=24) (actual time=0.012..13.825 rows=99,550 loops=3)