explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pPhx

Settings
# exclusive inclusive rows x rows loops node
1. 0.081 242.978 ↑ 1.0 30 1

Limit (cost=4,021.73..2,314,467.67 rows=30 width=61) (actual time=83.914..242.978 rows=30 loops=1)

2. 3.611 242.897 ↑ 143.3 30 1

Result (cost=4,021.73..331,090,924.41 rows=4,299 width=61) (actual time=83.909..242.897 rows=30 loops=1)

3. 2.047 74.586 ↑ 143.3 30 1

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

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

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

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

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

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

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

7. 2.135 6.710 ↑ 1.0 5,143 1

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

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

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

9. 1.201 6.168 ↑ 1.0 4,299 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 232kB
10. 4.967 4.967 ↑ 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..4.967 rows=4,299 loops=1)

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

SubPlan (for Result)

12. 159.271 164.700 ↑ 342.5 2 30

Index Scan using idx_stop_parent on stop s (cost=0.42..77,014.85 rows=685 width=32) (actual time=0.562..5.490 rows=2 loops=30)

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

SubPlan (for Index Scan)

14. 0.488 1.952 ↑ 1.0 1 61

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

15. 0.732 0.732 ↑ 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.011..0.012 rows=1 loops=61)

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

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

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

Index Scan using idx_consignment_stop_id on consignment c (cost=0.42..88.96 rows=9 width=32) (actual time=0.027..0.057 rows=4 loops=61)

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

SubPlan (for Index Scan)

19. 1.862 1.862 ↑ 1.0 1 266

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

  • Index Cond: (c.good_id = id)
Planning time : 36.331 ms
Execution time : 256.213 ms