explain.depesz.com

A tool for finding a real cause for slow queries.

Result: bFA

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=88,961.15..88,961.18 rows=1 width=22) (actual time=.. rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=88,961.15..88,961.15 rows=1 width=22) (actual time=.. rows= loops=)

  • Sort Key: facility.facility_id
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,439.89..88,961.14 rows=1 width=22) (actual time=.. rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,439.89..88,954.30 rows=1 width=30) (actual time=.. rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,439.89..88,945.96 rows=1 width=30) (actual time=.. rows= loops=)

  • Join Filter: (facilitycaregiver_unit.facilitycaregiver_id = monitoredsubject.facilitycaregiver_facilitycaregiver_id)
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,439.89..88,877.86 rows=10 width=46) (actual time=.. rows= loops=)

  • Hash Cond: (passport_passportitem.passportitem_id = monitoredsubject_passportitem.monitoredlicenses_passportitem_id)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,076.39..88,513.74 rows=28 width=62) (actual time=.. rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,076.39..88,104.08 rows=60 width=54) (actual time=.. rows= loops=)

  • Hash Cond: (providersentinelsearchresult.pertainsto_passportitem_id = passport_passportitem.passportitem_id)
9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on providersentinelsearchresult (cost=3,077.75..85,097.27 rows=2,015 width=22) (actual time=.. rows= loops=)

  • Recheck Cond: (supercededby_id IS NULL)
  • Filter: (complete AND ((resultstatus)::text = ANY ('{red,yellow}'::text[])))
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on providersentinelsearchresult_idx2 (cost=0.00..3,077.24 rows=166,522 width=0) (actual time=.. rows= loops=)

  • Index Cond: (supercededby_id IS NULL)
11. 0.000 0.000 ↓ 0.0

Hash (cost=2,975.52..2,975.52 rows=1,850 width=32) (actual time=.. rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,234.93..2,975.52 rows=1,850 width=32) (actual time=.. rows= loops=)

  • Hash Cond: (passport_passportitem.passport_id = caregiver.passport_id)
13. 0.000 0.000 ↓ 0.0

Seq Scan on passport_passportitem (cost=0.00..587.61 rows=35,861 width=16) (actual time=.. rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=2,218.91..2,218.91 rows=1,282 width=32) (actual time=.. rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,560.29..2,218.91 rows=1,282 width=32) (actual time=.. rows= loops=)

  • Hash Cond: (caregiver.caregiver_id = facilitycaregiver.caregiver_id)
16. 0.000 0.000 ↓ 0.0

Seq Scan on caregiver (cost=0.00..521.53 rows=24,853 width=16) (actual time=.. rows= loops=)

  • Filter: (NOT trashed)
17. 0.000 0.000 ↓ 0.0

Hash (cost=1,544.27..1,544.27 rows=1,282 width=32) (actual time=.. rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=608.70..1,544.27 rows=1,282 width=32) (actual time=.. rows= loops=)

  • Hash Cond: (facilitycaregiver.facilitycaregiver_id = facilitycaregiver_unit.facilitycaregiver_id)
19. 0.000 0.000 ↓ 0.0

Seq Scan on facilitycaregiver (cost=0.00..844.54 rows=20,855 width=16) (actual time=.. rows= loops=)

  • Filter: (((enddate IS NULL) OR (enddate > now())) AND (startdate < now()))
20. 0.000 0.000 ↓ 0.0

Hash (cost=588.32..588.32 rows=1,631 width=16) (actual time=.. rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Join (cost=48.32..588.32 rows=1,631 width=16) (actual time=.. rows= loops=)

  • Hash Cond: (facilitycaregiver_unit.unitorganization_id = facilityunit.unitorganization_id)
22. 0.000 0.000 ↓ 0.0

Seq Scan on facilitycaregiver_unit (cost=0.00..421.19 rows=27,319 width=16) (actual time=.. rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash (cost=46.72..46.72 rows=128 width=16) (actual time=.. rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.05..46.72 rows=128 width=16) (actual time=.. rows= loops=)

  • Hash Cond: (facilityunit.facilityorganization_id = facility.organization_id)
25. 0.000 0.000 ↓ 0.0

Seq Scan on facilityunit (cost=0.00..35.37 rows=2,137 width=16) (actual time=.. rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash (cost=2.00..2.00 rows=4 width=16) (actual time=.. rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on facility (cost=0.00..2.00 rows=4 width=16) (actual time=.. rows= loops=)

  • Filter: (facility_id = ANY ('{54,58,59,60}'::bigint[]))
28. 0.000 0.000 ↓ 0.0

Index Scan using license_passport_item_idx on license (cost=0.00..6.82 rows=1 width=8) (actual time=.. rows= loops=)

  • Index Cond: (passportitem_id = passport_passportitem.passportitem_id)
29. 0.000 0.000 ↓ 0.0

Hash (cost=201.00..201.00 rows=13,000 width=16) (actual time=.. rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on monitoredsubject_passportitem (cost=0.00..201.00 rows=13,000 width=16) (actual time=.. rows= loops=)

31. 0.000 0.000 ↓ 0.0

Index Scan using monitoredsubject_pkey on monitoredsubject (cost=0.00..6.79 rows=1 width=16) (actual time=.. rows= loops=)

  • Index Cond: (id = monitoredsubject_passportitem.monitoredsubject_id)
32. 0.000 0.000 ↓ 0.0

Index Scan using monitorserviceresult_pkey on monitorserviceresult (cost=0.00..8.32 rows=1 width=16) (actual time=.. rows= loops=)

  • Index Cond: (id = providersentinelsearchresult.parent_id)
33. 0.000 0.000 ↓ 0.0

Index Scan using monitorservicerequest_pkey on monitorservicerequest (cost=0.00..6.83 rows=1 width=8) (actual time=.. rows= loops=)

  • Index Cond: (id = monitorserviceresult.request_id)