explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rUN1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 53,672.872 ↑ 32,635,364.0 4 1

Group (cost=14,724,104.16..32,828,551.84 rows=130,541,456 width=118) (actual time=53,672.793..53,672.872 rows=4 loops=1)

  • Group Key: tblmovements.trip_id, ((tblmovements.tonnes)::real), ((tblmovements.tonnes_per_trailer)::real), v_transit_movement_extras.total_km, v_transit_movement_extras.total_hr, ((v_transit_movement_extras.mov_cst * '2'::double precision))
2. 0.000 53,685.782 ↑ 9,065,378.8 12 1

Gather Merge (cost=14,724,104.16..28,912,308.17 rows=108,784,546 width=114) (actual time=53,672.788..53,685.782 rows=12 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.198 161,002.914 ↑ 13,598,068.2 4 3

Group (cost=14,723,104.13..16,354,872.32 rows=54,392,273 width=114) (actual time=53,667.557..53,667.638 rows=4 loops=3)

  • Group Key: tblmovements.trip_id, ((tblmovements.tonnes)::real), ((tblmovements.tonnes_per_trailer)::real), v_transit_movement_extras.total_km, v_transit_movement_extras.total_hr, ((v_transit_movement_extras.mov_cst * '2'::double precision))
4. 1.488 161,002.716 ↑ 152,359.3 357 3

Sort (cost=14,723,104.13..14,859,084.82 rows=54,392,273 width=114) (actual time=53,667.552..53,667.572 rows=357 loops=3)

  • Sort Key: tblmovements.trip_id, ((tblmovements.tonnes)::real), ((tblmovements.tonnes_per_trailer)::real), v_transit_movement_extras.total_km, v_transit_movement_extras.total_hr, ((v_transit_movement_extras.mov_cst * '2'::double precision))
  • Sort Method: quicksort Memory: 113kB
  • Worker 0: Sort Method: quicksort Memory: 115kB
  • Worker 1: Sort Method: quicksort Memory: 129kB
5. 6.927 161,001.228 ↑ 152,359.3 357 3

Parallel Hash Left Join (cost=16,352.08..4,388,138.07 rows=54,392,273 width=114) (actual time=1,324.922..53,667.076 rows=357 loops=3)

  • Hash Cond: (tblsegments.trip_id = v_transit_movement_extras.trip_id)
6. 90,722.859 160,880.637 ↑ 152,359.3 357 3

Parallel Hash Left Join (cost=10,496.37..3,559,597.20 rows=54,392,273 width=101) (actual time=1,285.639..53,626.879 rows=357 loops=3)

  • Hash Cond: (tblsegments.trip_id = tblmovements.trip_id)
  • Filter: (hashed SubPlan 1)
  • Rows Removed by Filter: 87027249
7. 69,898.194 69,898.194 ↑ 1.3 87,027,606 3

Parallel Seq Scan on tblsegments (cost=0.00..3,263,536.47 rows=108,784,547 width=16) (actual time=0.007..23,299.398 rows=87,027,606 loops=3)

8. 157.353 258.609 ↑ 1.2 100,256 3

Parallel Hash (cost=8,584.20..8,584.20 rows=125,320 width=93) (actual time=86.202..86.203 rows=100,256 loops=3)

  • Buckets: 524288 Batches: 1 Memory Usage: 44768kB
9. 101.256 101.256 ↑ 1.2 100,256 3

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

10.          

SubPlan (forParallel Hash Left Join)

11. 0.975 0.975 ↑ 2,413.8 4 3

Index Only Scan using idx_tblsegments_key on tblsegments tblsegments_1 (cost=0.57..321.53 rows=9,655 width=8) (actual time=0.324..0.325 rows=4 loops=3)

  • Index Cond: (link_id = 1195728634)
  • Heap Fetches: 0
12. 72.204 113.664 ↑ 1.8 99,550 3

Parallel Hash (cost=3,659.76..3,659.76 rows=175,676 width=20) (actual time=37.888..37.888 rows=99,550 loops=3)

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

Parallel Seq Scan on v_transit_movement_extras (cost=0.00..3,659.76 rows=175,676 width=20) (actual time=0.011..13.820 rows=99,550 loops=3)