explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NS1y

Settings
# exclusive inclusive rows x rows loops node
1. 0.087 301.913 ↑ 1.0 30 1

Limit (cost=4,021.73..2,486,214.29 rows=30 width=61) (actual time=92.048..301.913 rows=30 loops=1)

2. 32.742 301.826 ↑ 143.3 30 1

Result (cost=4,021.73..355,702,215.77 rows=4,299 width=61) (actual time=92.045..301.826 rows=30 loops=1)

3. 3.340 80.864 ↑ 143.3 30 1

Sort (cost=4,021.73..4,032.48 rows=4,299 width=37) (actual time=80.729..80.864 rows=30 loops=1)

  • Sort Key: l.internal_reference_id DESC
  • Sort Method: top-N heapsort Memory: 27kB
4. 3.966 77.524 ↑ 1.0 4,299 1

Hash Join (cost=681.39..3,894.76 rows=4,299 width=37) (actual time=18.170..77.524 rows=4,299 loops=1)

  • Hash Cond: (l.id = lel.load_id)
5. 31.911 64.463 ↑ 1.0 5,143 1

Hash Join (cost=273.72..3,399.10 rows=5,143 width=37) (actual time=6.445..64.463 rows=5,143 loops=1)

  • Hash Cond: (v.id = l.vehicle_id)
6. 27.182 27.182 ↑ 1.0 101,960 1

Seq Scan on vehicle v (cost=0.00..2,691.60 rows=101,960 width=8) (actual time=0.041..27.182 rows=101,960 loops=1)

7. 1.643 5.370 ↑ 1.0 5,143 1

Hash (cost=209.43..209.43 rows=5,143 width=45) (actual time=5.370..5.370 rows=5,143 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 466kB
8. 3.727 3.727 ↑ 1.0 5,143 1

Seq Scan on load l (cost=0.00..209.43 rows=5,143 width=45) (actual time=0.032..3.727 rows=5,143 loops=1)

9. 2.737 9.095 ↑ 1.0 4,299 1

Hash (cost=353.94..353.94 rows=4,299 width=8) (actual time=9.095..9.095 rows=4,299 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 232kB
10. 6.358 6.358 ↑ 1.0 4,299 1

Seq Scan on load_execution_link lel (cost=0.00..353.94 rows=4,299 width=8) (actual time=0.046..6.358 rows=4,299 loops=1)

  • Filter: (shipper_business_id = '2121438735764555001'::bigint)
  • Rows Removed by Filter: 8096
11.          

SubPlan (for Result)

12. 177.240 188.220 ↑ 342.5 2 30

Index Scan using idx_stop_parent on stop s (cost=0.42..82,739.74 rows=685 width=32) (actual time=0.883..6.274 rows=2 loops=30)

  • Index Cond: (l.id = parent_id)
13.          

SubPlan (for Index Scan)

14. 1.464 3.111 ↑ 1.0 1 61

Nested Loop (cost=0.70..16.75 rows=1 width=32) (actual time=0.049..0.051 rows=1 loops=61)

15. 0.976 0.976 ↑ 1.0 1 61

Index Scan using idx_address_link_parent_id_parent_type on address_link al (cost=0.42..8.44 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=61)

  • Index Cond: (s.id = parent_id)
16. 0.671 0.671 ↑ 1.0 1 61

Index Scan using address_pkey on address a (cost=0.28..8.30 rows=1 width=541) (actual time=0.010..0.011 rows=1 loops=61)

  • Index Cond: (id = al.address_id)
17. 3.906 6.832 ↑ 2.2 4 61

Index Scan using idx_consignment_stop_id on consignment c (cost=0.42..89.01 rows=9 width=32) (actual time=0.049..0.112 rows=4 loops=61)

  • Index Cond: (s.id = stop_id)
18.          

SubPlan (for Index Scan)

19. 2.926 2.926 ↑ 1.0 1 266

Index Scan using good_pkey on good g (cost=0.42..8.44 rows=1 width=32) (actual time=0.011..0.011 rows=1 loops=266)

  • Index Cond: (c.good_id = id)
20. 1.037 1.037 ↑ 1.0 1 61

Index Scan using idx_facility_id_status on facility f (cost=0.29..8.31 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=61)

  • Index Cond: (s.facility_id = id)
Planning time : 3.905 ms
Execution time : 306.572 ms