explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BfDS

Settings
# exclusive inclusive rows x rows loops node
1. 0.169 330.105 ↑ 2.7 137 1

Unique (cost=2,034.96..2,043.37 rows=374 width=122) (actual time=329.886..330.105 rows=137 loops=1)

2. 1.424 329.936 ↓ 1.1 409 1

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

  • Sort Key: ((u.id)::text), u.username, u.first_name, u.last_name, u.phone, u.status, u.language_code, u.created_at
  • Sort Method: quicksort Memory: 83kB
3. 1.670 328.512 ↓ 1.1 409 1

Nested Loop (cost=40.73..2,018.98 rows=374 width=122) (actual time=0.686..328.512 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.212 324.302 ↓ 1.3 508 1

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

5. 0.048 0.292 ↑ 1.0 1 1

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.005 0.179 ↑ 1.0 1 1

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

  • Join Filter: (lel.load_id = ull.load_id)
9. 0.029 0.029 ↑ 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.028..0.029 rows=1 loops=1)

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

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

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

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

12. 0.193 0.255 ↓ 42.5 170 1

Bitmap Heap Scan on user_business_link ubl (cost=12.61..24.93 rows=4 width=16) (actual time=0.080..0.255 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.004 0.062 ↓ 0.0 0 1

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

14. 0.042 0.042 ↓ 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.042..0.042 rows=169 loops=1)

  • Index Cond: (business_id = lel.shipper_business_id)
15. 0.005 0.005 ↑ 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.005..0.005 rows=1 loops=1)

  • Index Cond: (business_id = lel.carrier_business_id)
16. 0.011 0.011 ↑ 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.011..0.011 rows=1 loops=1)

  • Index Cond: (user_id = dc.user_id)
17. 4.590 322.830 ↑ 5.3 3 170

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

18. 0.340 1.190 ↓ 0.0 0 170

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

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

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

20. 0.510 0.510 ↓ 0.0 0 170

Bitmap Index Scan on business_pkey (cost=0.00..0.16 rows=1 width=0) (actual time=0.003..0.003 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.510 0.510 ↓ 0.0 0 170

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Filter: ((id = ubl.business_id) OR (id = dc.business_id))
29. 2.540 2.540 ↑ 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.004..0.005 rows=1 loops=508)

  • Index Cond: (id = ubl.user_id)
Planning time : 3.557 ms
Execution time : 330.541 ms