explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2mgV

Settings
# exclusive inclusive rows x rows loops node
1. 0.029 196.240 ↑ 1.0 30 1

Limit (cost=4,021.73..388,413.07 rows=30 width=61) (actual time=71.898..196.240 rows=30 loops=1)

2. 0.622 196.211 ↑ 143.3 30 1

Result (cost=4,021.73..55,087,301.12 rows=4,299 width=61) (actual time=71.893..196.211 rows=30 loops=1)

3. 2.012 64.759 ↑ 143.3 30 1

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

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

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

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

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

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

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

7. 1.218 4.756 ↑ 1.0 5,143 1

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

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

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

9. 1.250 6.072 ↑ 1.0 4,299 1

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

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

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

SubPlan (for Result)

12. 0.406 130.830 ↑ 669.8 9 30

Nested Loop (cost=1.97..12,813.03 rows=6,028 width=32) (actual time=0.409..4.361 rows=9 loops=30)

13. 0.317 129.360 ↑ 670.1 9 30

Nested Loop (cost=1.54..9,577.42 rows=6,031 width=32) (actual time=0.395..4.312 rows=9 loops=30)

  • Join Filter: (s.id = c.stop_id)
14. 0.202 128.250 ↑ 342.5 2 30

Nested Loop (cost=1.12..8,942.86 rows=685 width=32) (actual time=0.372..4.275 rows=2 loops=30)

15. 0.263 127.560 ↑ 342.5 2 30

Nested Loop (cost=0.84..8,728.92 rows=685 width=40) (actual time=0.361..4.252 rows=2 loops=30)

16. 126.870 126.870 ↑ 342.5 2 30

Index Scan using idx_stop_parent on stop s (cost=0.42..4,602.38 rows=685 width=24) (actual time=0.345..4.229 rows=2 loops=30)

  • Index Cond: (l.id = parent_id)
17. 0.427 0.427 ↑ 1.0 1 61

Index Scan using idx_address_link_parent_id on address_link al (cost=0.42..6.01 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=61)

  • Index Cond: (parent_id = s.id)
18. 0.488 0.488 ↑ 1.0 1 61

Index Only Scan using address_pkey on address a (cost=0.28..0.30 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=61)

  • Index Cond: (id = al.address_id)
  • Heap Fetches: 61
19. 0.793 0.793 ↑ 2.2 4 61

Index Scan using idx_consignment_stop_id on consignment c (cost=0.42..0.81 rows=9 width=16) (actual time=0.010..0.013 rows=4 loops=61)

  • Index Cond: (stop_id = al.parent_id)
20. 1.064 1.064 ↑ 1.0 1 266

Index Only Scan using good_pkey on good g (cost=0.42..0.53 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=266)

  • Index Cond: (id = c.good_id)
  • Heap Fetches: 266
Planning time : 44.086 ms
Execution time : 196.665 ms