explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GzpU : 123212

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 1,602.888 ↓ 6.0 6 1

Limit (cost=859.32..867.81 rows=1 width=191) (actual time=1,602.640..1,602.888 rows=6 loops=1)

2. 0.020 1,602.883 ↓ 6.0 6 1

Nested Loop Left Join (cost=859.32..867.81 rows=1 width=191) (actual time=1,602.638..1,602.883 rows=6 loops=1)

  • Join Filter: (cp.carrier_id = lb.carrier_id)
3. 0.065 1,602.731 ↓ 6.0 6 1

Merge Join (cost=859.32..859.56 rows=1 width=167) (actual time=1,602.620..1,602.731 rows=6 loops=1)

  • Merge Cond: (load_data.id = lb.load_data_id)
4. 0.273 1,602.506 ↓ 25.1 201 1

Sort (cost=832.67..832.69 rows=8 width=143) (actual time=1,602.458..1,602.506 rows=201 loops=1)

  • Sort Key: load_data.id DESC
  • Sort Method: quicksort Memory: 54kB
5. 1.975 1,602.233 ↓ 26.2 210 1

Nested Loop (cost=2.18..832.55 rows=8 width=143) (actual time=126.315..1,602.233 rows=210 loops=1)

  • Join Filter: (load_data.client_id = c.id)
  • Rows Removed by Join Filter: 7,428
6. 0.315 1,597.948 ↓ 210.0 210 1

Merge Join (cost=2.18..830.63 rows=1 width=149) (actual time=126.289..1,597.948 rows=210 loops=1)

  • Merge Cond: (load_data.client_id = cc.client_id)
7. 85.349 1,597.539 ↑ 1.2 280 1

Nested Loop Left Join (cost=0.29..67,930.72 rows=328 width=141) (actual time=26.069..1,597.539 rows=280 loops=1)

  • Join Filter: (load_data.id = dls.load_data_id)
  • Rows Removed by Join Filter: 320,292
8. 804.292 1,445.830 ↑ 1.2 280 1

Nested Loop Left Join (cost=0.29..60,885.75 rows=328 width=92) (actual time=20.477..1,445.830 rows=280 loops=1)

  • Join Filter: (load_data.id = pls.load_data_id)
  • Rows Removed by Join Filter: 3,184,384
9. 5.938 5.938 ↑ 1.2 280 1

Index Scan using load_data_client_id_index on load_data (cost=0.29..3,099.64 rows=328 width=43) (actual time=0.073..5.938 rows=280 loops=1)

  • Filter: ((booked_status = 1) AND ((equipment)::text = ANY ('{Reefer,""Dry Van"",Flatbed,""Sprinter Van"",Hopper,Tanker}'::text[])))
  • Rows Removed by Filter: 14,331
10. 623.837 635.600 ↑ 1.0 11,373 280

Materialize (cost=0.00..1,613.50 rows=11,423 width=57) (actual time=0.000..2.270 rows=11,373 loops=280)

11. 11.763 11.763 ↑ 1.0 11,373 1

Seq Scan on load_stops pls (cost=0.00..1,556.39 rows=11,423 width=57) (actual time=0.012..11.763 rows=11,373 loops=1)

  • Filter: (sequence_order = 1)
  • Rows Removed by Filter: 31,965
12. 61.662 66.360 ↓ 1.0 1,144 280

Materialize (cost=0.00..1,561.96 rows=1,115 width=57) (actual time=0.006..0.237 rows=1,144 loops=280)

13. 4.698 4.698 ↓ 1.0 1,144 1

Seq Scan on load_stops dls (cost=0.00..1,556.39 rows=1,115 width=57) (actual time=1.578..4.698 rows=1,144 loops=1)

  • Filter: (load_stop_type = 2)
  • Rows Removed by Filter: 42,194
14. 0.077 0.094 ↓ 215.0 215 1

Sort (cost=1.90..1.90 rows=1 width=8) (actual time=0.032..0.094 rows=215 loops=1)

  • Sort Key: cc.client_id
  • Sort Method: quicksort Memory: 25kB
15. 0.017 0.017 ↓ 8.0 8 1

Seq Scan on carrier_client cc (cost=0.00..1.89 rows=1 width=8) (actual time=0.013..0.017 rows=8 loops=1)

  • Filter: ((id IS NOT NULL) AND ((mc_number)::text = '121212'::text))
  • Rows Removed by Filter: 83
16. 2.310 2.310 ↑ 1.1 36 210

Seq Scan on clients c (cost=0.00..1.41 rows=41 width=18) (actual time=0.002..0.011 rows=36 loops=210)

17. 0.032 0.160 ↑ 1.2 33 1

Sort (cost=26.65..26.74 rows=38 width=28) (actual time=0.153..0.160 rows=33 loops=1)

  • Sort Key: lb.load_data_id DESC
  • Sort Method: quicksort Memory: 27kB
18. 0.128 0.128 ↑ 1.2 33 1

Seq Scan on load_booking lb (cost=0.00..25.65 rows=38 width=28) (actual time=0.026..0.128 rows=33 loops=1)

  • Filter: ((bid_amount >= '2637'::double precision) AND (bid_amount <= '12000'::double precision) AND (carrier_id = 95))
  • Rows Removed by Filter: 755
19. 0.132 0.132 ↑ 1.0 1 6

Seq Scan on carrier_profile cp (cost=0.00..8.24 rows=1 width=18) (actual time=0.005..0.022 rows=1 loops=6)

  • Filter: (carrier_id = 95)
  • Rows Removed by Filter: 291
Planning time : 1.344 ms
Execution time : 1,603.084 ms