explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rB1S

Settings
# exclusive inclusive rows x rows loops node
1. 0.072 353.653 ↑ 2.7 137 1

Unique (cost=2,034.96..2,036.83 rows=374 width=122) (actual time=353.555..353.653 rows=137 loops=1)

2. 1.764 353.581 ↓ 1.1 409 1

Sort (cost=2,034.96..2,035.89 rows=374 width=122) (actual time=353.554..353.581 rows=409 loops=1)

  • Sort Key: ((u.id)::text)
  • Sort Method: quicksort Memory: 84kB
3. 2.171 351.817 ↓ 1.1 409 1

Nested Loop (cost=40.73..2,018.98 rows=374 width=122) (actual time=0.947..351.817 rows=409 loops=1)

  • Join Filter: (((u.status <> 803) AND (u.status <> 804)) OR ((u.id = '1784965618986911498'::bigint) AND (b.type = 1002)))
  • Rows Removed by Join Filter: 99
4. 0.225 346.598 ↓ 1.3 508 1

Nested Loop (cost=40.44..1,841.87 rows=378 width=12) (actual time=0.923..346.598 rows=508 loops=1)

5. 0.097 0.496 ↑ 1.0 1 1

Hash Right Join (cost=27.30..32.69 rows=1 width=32) (actual time=0.479..0.496 rows=1 loops=1)

  • Hash Cond: ((dc.business_id = lel.carrier_business_id) AND (dc.user_id = ull.user_id))
6. 0.088 0.088 ↑ 1.0 111 1

Seq Scan on driver_contact dc (cost=0.00..4.55 rows=111 width=16) (actual time=0.035..0.088 rows=111 loops=1)

  • Filter: (status_code <> 1301)
  • Rows Removed by Filter: 13
7. 0.008 0.311 ↑ 1.0 1 1

Hash (cost=27.29..27.29 rows=1 width=24) (actual time=0.311..0.311 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.009 0.303 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.28..27.29 rows=1 width=24) (actual time=0.284..0.303 rows=1 loops=1)

  • Join Filter: (lel.load_id = ull.load_id)
9. 0.034 0.034 ↑ 1.0 1 1

Index Scan using idx_load_execution_link_load_carrier_business_id_status on load_execution_link lel (cost=0.28..8.30 rows=1 width=24) (actual time=0.032..0.034 rows=1 loops=1)

  • Index Cond: (load_id = '2161304572058928665'::bigint)
10. 0.260 0.260 ↑ 1.0 1 1

Seq Scan on user_load_link ull (cost=0.00..18.98 rows=1 width=16) (actual time=0.243..0.260 rows=1 loops=1)

  • Filter: (load_id = '2161304572058928665'::bigint)
  • Rows Removed by Filter: 557
11. 0.909 345.877 ↓ 7.9 508 1

Nested Loop (cost=13.14..1,808.54 rows=64 width=28) (actual time=0.440..345.877 rows=508 loops=1)

12. 0.279 0.378 ↓ 42.5 170 1

Bitmap Heap Scan on user_business_link ubl (cost=12.61..24.93 rows=4 width=16) (actual time=0.118..0.378 rows=170 loops=1)

  • Recheck Cond: ((business_id = lel.shipper_business_id) OR (business_id = lel.carrier_business_id) OR (user_id = dc.user_id))
  • Heap Blocks: exact=28
13. 0.008 0.099 ↓ 0.0 0 1

BitmapOr (cost=12.61..12.61 rows=4 width=0) (actual time=0.099..0.099 rows=0 loops=1)

14. 0.046 0.046 ↓ 84.5 169 1

Bitmap Index Scan on idx_user_business_link_business_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.046..0.046 rows=169 loops=1)

  • Index Cond: (business_id = lel.shipper_business_id)
15. 0.011 0.011 ↑ 2.0 1 1

Bitmap Index Scan on idx_user_business_link_business_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: (business_id = lel.carrier_business_id)
16. 0.034 0.034 ↑ 1.0 1 1

Bitmap Index Scan on idx_user_business_link_user_id (cost=0.00..0.79 rows=1 width=0) (actual time=0.034..0.034 rows=1 loops=1)

  • Index Cond: (user_id = dc.user_id)
17. 5.610 344.590 ↑ 5.3 3 170

Append (cost=0.54..445.74 rows=16 width=12) (actual time=0.223..2.027 rows=3 loops=170)

18. 0.510 1.700 ↓ 0.0 0 170

Bitmap Heap Scan on business b (cost=0.54..4.57 rows=2 width=12) (actual time=0.010..0.010 rows=0 loops=170)

  • Recheck Cond: ((id = ubl.business_id) OR (id = dc.business_id))
19. 0.170 1.190 ↓ 0.0 0 170

BitmapOr (cost=0.54..0.54 rows=2 width=0) (actual time=0.007..0.007 rows=0 loops=170)

20. 0.850 0.850 ↓ 0.0 0 170

Bitmap Index Scan on business_pkey (cost=0.00..0.16 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=170)

  • Index Cond: (id = ubl.business_id)
21. 0.170 0.170 ↓ 0.0 0 170

Bitmap Index Scan on business_pkey (cost=0.00..0.23 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=170)

  • Index Cond: (id = dc.business_id)
22. 0.680 0.680 ↓ 0.0 0 170

Seq Scan on broker_business b_1 (cost=0.00..1.03 rows=2 width=12) (actual time=0.004..0.004 rows=0 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
  • Rows Removed by Filter: 11
23. 30.600 30.600 ↓ 0.0 0 170

Seq Scan on business_history b_2 (cost=0.00..31.65 rows=2 width=12) (actual time=0.180..0.180 rows=0 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
  • Rows Removed by Filter: 910
24. 174.250 174.250 ↑ 1.0 2 170

Seq Scan on carrier_business b_3 (cost=0.00..209.58 rows=2 width=12) (actual time=0.017..1.025 rows=2 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
  • Rows Removed by Filter: 5770
25. 17.000 17.000 ↑ 2.0 1 170

Seq Scan on shipper_business b_4 (cost=0.00..19.27 rows=2 width=12) (actual time=0.055..0.100 rows=1 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
  • Rows Removed by Filter: 550
26. 0.340 0.340 ↓ 0.0 0 170

Seq Scan on broker_business_history b_5 (cost=0.00..10.30 rows=2 width=12) (actual time=0.002..0.002 rows=0 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
27. 114.070 114.070 ↓ 0.0 0 170

Seq Scan on carrier_business_history b_6 (cost=0.00..158.90 rows=2 width=12) (actual time=0.671..0.671 rows=0 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
  • Rows Removed by Filter: 3860
28. 0.340 0.340 ↓ 0.0 0 170

Seq Scan on shipper_business_history b_7 (cost=0.00..10.45 rows=2 width=12) (actual time=0.002..0.002 rows=0 loops=170)

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
29. 3.048 3.048 ↑ 1.0 1 508

Index Scan using idx_business_user_id on business_user u (cost=0.28..0.44 rows=1 width=66) (actual time=0.005..0.006 rows=1 loops=508)

  • Index Cond: (id = ubl.user_id)
Planning time : 3.798 ms
Execution time : 354.203 ms