explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t4YF

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 183,647.808 ↑ 135,416.4 964 1

Group (cost=23,902,592.90..42,007,040.59 rows=130,541,456 width=118) (actual time=183,425.393..183,647.808 rows=964 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 185,391.041 ↑ 96,525.8 1,127 1

Gather Merge (cost=23,902,592.90..38,090,796.92 rows=108,784,546 width=114) (actual time=183,425.388..185,391.041 rows=1,127 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 272.277 550,713.660 ↑ 144,660.3 376 3

Group (cost=23,901,592.88..25,533,361.07 rows=54,392,273 width=114) (actual time=183,356.482..183,571.220 rows=376 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. 2,946.153 550,441.383 ↑ 92.5 587,840 3

Sort (cost=23,901,592.88..24,037,573.56 rows=54,392,273 width=114) (actual time=183,356.475..183,480.461 rows=587,840 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: external merge Disk: 68328kB
  • Worker 0: Sort Method: external merge Disk: 80696kB
  • Worker 1: Sort Method: external merge Disk: 75712kB
5. 180,639.108 547,495.230 ↑ 92.5 587,840 3

Parallel Hash Left Join (cost=19,218.08..6,873,821.82 rows=54,392,273 width=114) (actual time=143,356.448..182,498.410 rows=587,840 loops=3)

  • Hash Cond: (tblsegments.trip_id = tblmovements.trip_id)
  • Filter: (hashed SubPlan 1)
  • Rows Removed by Filter: 86439766
6. 181,215.357 366,019.617 ↑ 1.3 87,027,606 3

Parallel Hash Left Join (cost=6,885.71..4,619,365.67 rows=108,784,547 width=20) (actual time=79,562.588..122,006.539 rows=87,027,606 loops=3)

  • Hash Cond: (tblsegments.trip_id = v_transit_movement_extras.trip_id)
7. 184,152.006 184,152.006 ↑ 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.702..61,384.002 rows=87,027,606 loops=3)

8. 596.355 652.254 ↑ 1.8 99,550 3

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

  • Buckets: 65536 Batches: 8 Memory Usage: 2592kB
9. 55.899 55.899 ↑ 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.012..18.633 rows=99,550 loops=3)

10. 715.218 814.728 ↑ 1.2 100,256 3

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

  • Buckets: 32768 Batches: 16 Memory Usage: 2880kB
11. 99.510 99.510 ↑ 1.2 100,256 3

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

12.          

SubPlan (forParallel Hash Left Join)

13. 21.777 21.777 ↑ 10.0 964 3

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

  • Index Cond: (link_id = 945895182)
  • Heap Fetches: 0