explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nge5

Settings
# exclusive inclusive rows x rows loops node
1. 0.422 64.186 ↓ 57.0 57 1

Sort (cost=1,053.78..1,053.79 rows=1 width=15,454) (actual time=64.170..64.186 rows=57 loops=1)

  • Sort Key: (COALESCE(timezone('UTC'::text, ((carrier_available_trucks.metadata ->> 'externally_created_at'::text))::timestamp without time zone), (carrier_available_trucks.c
  • Sort Method: quicksort Memory: 138kB
  • Planning time: 8.299 ms
  • Execution time: 66.057 ms
2. 0.429 63.764 ↓ 57.0 57 1

Nested Loop Left Join (cost=482.92..1,053.77 rows=1 width=15,454) (actual time=58.148..63.764 rows=57 loops=1)

  • Join Filter: ((outbound_phone_calls_carrier_available_trucks.to_phone_number)::text = carrier_available_trucks.contact_phone)
  • Rows Removed by Join Filter: 2907
3. 0.077 62.822 ↓ 57.0 57 1

Nested Loop Left Join (cost=482.92..1,050.73 rows=1 width=15,122) (actual time=58.106..62.822 rows=57 loops=1)

4. 0.078 62.745 ↓ 57.0 57 1

Nested Loop Left Join (cost=482.50..1,042.28 rows=1 width=13,594) (actual time=58.101..62.745 rows=57 loops=1)

5. 0.292 62.667 ↓ 57.0 57 1

Nested Loop Left Join (cost=482.08..1,033.84 rows=1 width=12,066) (actual time=58.097..62.667 rows=57 loops=1)

  • Join Filter: ((phone_calls.from_phone_number)::text = carrier_available_trucks.contact_phone)
  • Rows Removed by Join Filter: 2907
6. 0.051 61.805 ↓ 57.0 57 1

Nested Loop Left Join (cost=482.08..1,030.80 rows=1 width=11,742) (actual time=58.071..61.805 rows=57 loops=1)

7. 0.062 61.660 ↓ 47.0 47 1

Nested Loop Left Join (cost=481.80..1,030.44 rows=1 width=11,685) (actual time=58.063..61.660 rows=47 loops=1)

8. 0.056 61.410 ↓ 47.0 47 1

Nested Loop Left Join (cost=481.37..1,029.81 rows=1 width=10,700) (actual time=58.047..61.410 rows=47 loops=1)

9. 0.022 61.213 ↓ 47.0 47 1

Nested Loop Left Join (cost=480.95..1,029.35 rows=1 width=9,682) (actual time=58.024..61.213 rows=47 loops=1)

10. 1.757 61.144 ↓ 47.0 47 1

Hash Right Join (cost=480.81..1,028.58 rows=1 width=8,622) (actual time=58.020..61.144 rows=47 loops=1)

  • Hash Cond: (ops_carrier_checklist.carrier_application_id = carrier_applications.id)
11. 1.592 1.592 ↑ 1.0 21,146 1

Seq Scan on ops_carrier_checklist (cost=0.00..468.46 rows=21,146 width=97) (actual time=0.009..1.592 rows=21,146 loops=1)

12. 0.221 57.795 ↓ 47.0 47 1

Hash (cost=480.80..480.80 rows=1 width=8,525) (actual time=57.795..57.795 rows=47 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
13. 0.176 57.574 ↓ 47.0 47 1

Nested Loop Left Join (cost=10.30..480.80 rows=1 width=8,525) (actual time=2.312..57.574 rows=47 loops=1)

  • Join Filter: (equipment.id = carrier_equipments.equipment_id)
  • Rows Removed by Join Filter: 900
14. 0.068 57.304 ↓ 47.0 47 1

Nested Loop Left Join (cost=10.30..479.35 rows=1 width=7,465) (actual time=2.303..57.304 rows=47 loops=1)

15. 0.063 57.095 ↓ 47.0 47 1

Nested Loop Left Join (cost=9.88..474.63 rows=1 width=5,937) (actual time=2.301..57.095 rows=47 loops=1)

16. 0.037 56.942 ↓ 45.0 45 1

Nested Loop Left Join (cost=9.60..474.32 rows=1 width=5,903) (actual time=2.296..56.942 rows=45 loops=1)

17. 0.066 56.860 ↓ 45.0 45 1

Nested Loop (cost=9.17..465.86 rows=1 width=4,918) (actual time=2.294..56.860 rows=45 loops=1)

18. 0.084 56.614 ↓ 45.0 45 1

Nested Loop Left Join (cost=8.75..457.41 rows=1 width=3,933) (actual time=2.285..56.614 rows=45 loops=1)

19. 0.166 0.166 ↓ 21.0 21 1

Index Scan using carrier_available_trucks_pkey on carrier_available_trucks (cost=0.29..98.27 rows=1 width=305) (actual time=0.024..0.166 rows=21 loops=1)

  • Index Cond: (id = ANY ('{44276,44277,44299,44334,44344,44346,44361,44362,44385,44394,44400,44410,44388,44390,44389,44317,44302,44339,44399,44285,44284}'::integer[]))
  • Filter: ((deleted_at IS NULL) AND (source = ANY ('{manual,carrier_lane_search,inbound_email,dat}'::text[])) AND ((empty_at)::date = '2019-03-11'::date) AND ((empty_at > (now() - '24:00:00'::interval)) OR (source = 'covered_bid'::text)))
20. 30.408 56.364 ↓ 2.0 2 21

Hash Right Join (cost=8.46..359.13 rows=1 width=3,628) (actual time=2.074..2.684 rows=2 loops=21)

  • Hash Cond: (carrier_equipments.carrier_application_id = carrier_applications.id)
21. 25.809 25.809 ↑ 1.0 17,648 21

Seq Scan on carrier_equipments (cost=0.00..284.48 rows=17,648 width=28) (actual time=0.004..1.229 rows=17,648 loops=21)

22. 0.021 0.147 ↑ 1.0 1 21

Hash (cost=8.45..8.45 rows=1 width=3,600) (actual time=0.007..0.007 rows=1 loops=21)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
23. 0.126 0.126 ↑ 1.0 1 21

Index Scan using carrier_applications_pkey on carrier_applications (cost=0.43..8.45 rows=1 width=3,600) (actual time=0.006..0.006 rows=1 loops=21)

  • Index Cond: (id = carrier_available_trucks.carrier_application_id)
24. 0.180 0.180 ↑ 1.0 1 45

Index Scan using locations_pkey on locations (cost=0.43..8.45 rows=1 width=985) (actual time=0.004..0.004 rows=1 loops=45)

  • Index Cond: (id = carrier_available_trucks.truck_location_id)
  • Filter: ((deleted_at IS NULL) AND ((state_code)::text = 'NC'::text))
25. 0.045 0.045 ↓ 0.0 0 45

Index Scan using locations_pkey on locations desired_destination_locations_carrier_available_trucks (cost=0.43..8.45 rows=1 width=985) (actual time=0.001..0.001 rows=0 loops=45)

  • Index Cond: (id = carrier_available_trucks.desired_destination_location_id)
  • Filter: (deleted_at IS NULL)
26. 0.090 0.090 ↓ 0.0 0 45

Index Scan using carrier_manager_relationships_uq_idx on carrier_manager_relationships (cost=0.28..0.30 rows=1 width=34) (actual time=0.002..0.002 rows=0 loops=45)

  • Index Cond: (carrier_application_id = carrier_applications.id)
27. 0.141 0.141 ↓ 0.0 0 47

Index Scan using users_pkey on users (cost=0.42..4.71 rows=1 width=1,528) (actual time=0.003..0.003 rows=0 loops=47)

  • Index Cond: (id = carrier_manager_relationships.user_id)
28. 0.094 0.094 ↑ 1.0 20 47

Seq Scan on equipment (cost=0.00..1.20 rows=20 width=1,060) (actual time=0.001..0.002 rows=20 loops=47)

29. 0.047 0.047 ↓ 0.0 0 47

Index Scan using equipment_pkey on equipment parents_equipment (cost=0.14..0.76 rows=1 width=1,060) (actual time=0.001..0.001 rows=0 loops=47)

  • Index Cond: (id = equipment.parent_id)
30. 0.141 0.141 ↑ 1.0 1 47

Index Scan using index_fmcsa_carriers_on_carrier_application_id on fmcsa_carriers (cost=0.42..0.45 rows=1 width=1,018) (actual time=0.003..0.003 rows=1 loops=47)

  • Index Cond: (carrier_application_id = carrier_applications.id)
31. 0.188 0.188 ↑ 1.0 1 47

Index Scan using index_locations_on_locatable_type_and_locatable_id on locations locations_carrier_applications (cost=0.43..0.62 rows=1 width=985) (actual time=0.004..0.004 rows=1 loops=47)

  • Index Cond: (((locatable_type)::text = 'CarrierApplication'::text) AND (locatable_id = carrier_applications.id))
  • Filter: (deleted_at IS NULL)
32. 0.094 0.094 ↑ 2.0 1 47

Index Scan using coverages_checklist_idx on carrier_insurance_commodities_coverages (cost=0.28..0.34 rows=2 width=57) (actual time=0.001..0.002 rows=1 loops=47)

  • Index Cond: (ops_carrier_checklist_id = ops_carrier_checklist.id)
33. 0.570 0.570 ↓ 1.1 51 57

Seq Scan on phone_calls (cost=0.00..2.46 rows=46 width=324) (actual time=0.001..0.010 rows=51 loops=57)

34. 0.000 0.000 ↓ 0.0 0 57

Index Scan using users_pkey on users from_users_phone_calls (cost=0.42..8.44 rows=1 width=1,528) (actual time=0.000..0.000 rows=0 loops=57)

  • Index Cond: (id = phone_calls.from_id)
35. 0.000 0.000 ↓ 0.0 0 57

Index Scan using users_pkey on users to_users_phone_calls (cost=0.42..8.44 rows=1 width=1,528) (actual time=0.000..0.000 rows=0 loops=57)

  • Index Cond: (id = phone_calls.to_id)
36. 0.513 0.513 ↓ 1.1 51 57

Seq Scan on phone_calls outbound_phone_calls_carrier_available_trucks (cost=0.00..2.46 rows=46 width=324) (actual time=0.001..0.009 rows=51 loops=57)