explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2KbS : Optimization for: plan #7MAG

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,346,738.38..1,346,743.21 rows=5 width=389) (actual rows= loops=)

  • Group Key: chwlist.branch_uuid, chwlist.branch_name, chwlist.supervisor_uuid, chwlist.supervisor_name, chwlist.chw_uuid, chwlist.chw_name, chwlist.chw_phone, (date(chwlist.interval_start)), chwlist.interval_number
  • Functions: 498
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
2. 0.000 0.000 ↓ 0.0

Sort (cost=1,346,738.38..1,346,738.42 rows=14 width=553) (actual rows= loops=)

  • Sort Key: chwlist.branch_uuid, chwlist.branch_name, chwlist.supervisor_uuid, chwlist.supervisor_name, chwlist.chw_uuid, chwlist.chw_name, chwlist.chw_phone, (date(chwlist.interval_start)), chwlist.interval_number
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=856,222.67..1,346,738.12 rows=14 width=553) (actual rows= loops=)

  • Join Filter: ((sync.chw_uuid = chwlist.chw_uuid) AND (sync.interval_number = chwlist.interval_number))
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=856,222.11..916,688.74 rows=14 width=549) (actual rows= loops=)

  • Hash Cond: ((chwlist.chw_uuid = fp.chw_uuid) AND (chwlist.interval_number = fp.interval_number))
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=851,661.78..912,128.33 rows=14 width=541) (actual rows= loops=)

  • Join Filter: (chwlist.interval_number = 0)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=851,661.49..904,237.11 rows=14 width=537) (actual rows= loops=)

  • Hash Cond: ((chwlist.chw_uuid = communityevent.chw_uuid) AND (chwlist.interval_number = communityevent.interval_number))
7. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=847,179.98..899,755.52 rows=14 width=529) (actual rows= loops=)

  • Merge Cond: (chwlist.chw_area_uuid = ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[])))
  • Join Filter: ((0) = chwlist.interval_number)
8. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=820,689.96..873,251.00 rows=14 width=561) (actual rows= loops=)

  • Merge Cond: (chwlist.chw_area_uuid = cmeta_1.parent_uuid)
  • Join Filter: (chwlist.interval_number = (0))
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=583,457.19..623,037.55 rows=5 width=509) (actual rows= loops=)

  • Join Filter: ((chwlist.chw_uuid = assess.chw_uuid) AND (chwlist.interval_number = assess.interval_number))
10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=508,561.95..521,000.15 rows=5 width=293) (actual rows= loops=)

  • Join Filter: ((chwlist.chw_uuid = eddnopnc.chw_uuid) AND (chwlist.interval_number = eddnopnc.interval_number))
11. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=122,438.56..122,576.35 rows=5 width=285) (actual rows= loops=)

  • Merge Cond: ((chwlist.chw_area_uuid = familyreg.chw_area_uuid) AND (chwlist.interval_number = familyreg.interval_number))
12. 0.000 0.000 ↓ 0.0

Sort (cost=60,748.41..60,748.43 rows=5 width=277) (actual rows= loops=)

  • Sort Key: chwlist.chw_area_uuid, chwlist.interval_number
13. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=60,489.04..60,748.36 rows=5 width=277) (actual rows= loops=)

  • Merge Cond: (chwlist.chw_uuid = visit.chw)
  • Join Filter: (chwlist.interval_number = (0))
14. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=54,778.33..54,884.46 rows=5 width=269) (actual rows= loops=)

  • Merge Cond: (chwlist.chw_uuid = assess_1.chw)
  • Join Filter: (chwlist.interval_number = (0))
15. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=4,050.91..4,068.68 rows=5 width=261) (actual rows= loops=)

  • Merge Cond: ((chwlist.chw_uuid = pncvisit.chw_uuid) AND (chwlist.interval_number = pncvisit.interval_number))
16. 0.000 0.000 ↓ 0.0

Sort (cost=308.75..308.77 rows=5 width=213) (actual rows= loops=)

  • Sort Key: chwlist.chw_uuid, chwlist.interval_number
17. 0.000 0.000 ↓ 0.0

Subquery Scan on chwlist (cost=267.35..308.70 rows=5 width=213) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=267.35..308.65 rows=5 width=213) (actual rows= loops=)

  • Hash Cond: ((row_number() OVER (?)) = (row_number() OVER (?)))
19. 0.000 0.000 ↓ 0.0

WindowAgg (cost=59.85..87.35 rows=1,000 width=24) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Sort (cost=59.85..62.35 rows=1,000 width=8) (actual rows= loops=)

  • Sort Key: generate_series.generate_series
21. 0.000 0.000 ↓ 0.0

Function Scan on generate_series (cost=0.02..10.02 rows=1,000 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=207.49..207.49 rows=1 width=213) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.41..207.49 rows=1 width=213) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=7.33..207.37 rows=1 width=201) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.06..207.06 rows=1 width=201) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6.50..204.52 rows=1 width=185) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Index Scan using contactview_metadata_type on contactview_metadata cmd (cost=0.43..2.65 rows=1 width=52) (actual rows= loops=)

  • Index Cond: (type = 'district_hospital'::text)
  • Filter: (name <> ALL ('{HQ,"HQ OVC"}'::text[]))
28. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on contactview_chp chp_1 (cost=6.07..198.66 rows=321 width=166) (actual rows= loops=)

  • Recheck Cond: (branch_uuid = cmd.uuid)
29. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on contactview_chp_branch_uuid (cost=0.00..5.99 rows=321 width=0) (actual rows= loops=)

  • Index Cond: (branch_uuid = cmd.uuid)
30. 0.000 0.000 ↓ 0.0

Index Scan using contactview_metadata_uuid on contactview_metadata cmeta (cost=0.56..2.54 rows=1 width=52) (actual rows= loops=)

  • Index Cond: (uuid = chp_1.supervisor_uuid)
31. 0.000 0.000 ↓ 0.0

Index Only Scan using chp_muting_chw on chp_muting (cost=0.28..0.30 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (chw = chp_1.uuid)
32. 0.000 0.000 ↓ 0.0

WindowAgg (cost=0.07..0.09 rows=1 width=16) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Sort (cost=0.07..0.08 rows=1 width=4) (actual rows= loops=)

  • Sort Key: generate_series_1.generate_series
34. 0.000 0.000 ↓ 0.0

Function Scan on generate_series generate_series_1 (cost=0.05..0.06 rows=1 width=4) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Sort (cost=3,742.16..3,748.06 rows=2,362 width=87) (actual rows= loops=)

  • Sort Key: pncvisit.chw_uuid, pncvisit.interval_number
36. 0.000 0.000 ↓ 0.0

Subquery Scan on pncvisit (cost=3,275.97..3,609.82 rows=2,362 width=87) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=3,275.97..3,586.20 rows=2,362 width=87) (actual rows= loops=)

  • Group Key: useview_postnatal_care.chw, 0
38. 0.000 0.000 ↓ 0.0

Sort (cost=3,275.97..3,284.66 rows=3,474 width=61) (actual rows= loops=)

  • Sort Key: useview_postnatal_care.chw
39. 0.000 0.000 ↓ 0.0

Index Scan using useview_postnatal_care_count_reported_uuid on useview_postnatal_care (cost=0.45..3,071.66 rows=3,474 width=61) (actual rows= loops=)

  • Index Cond: ((follow_up_count = '1'::text) AND (reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
40. 0.000 0.000 ↓ 0.0

Materialize (cost=50,727.42..50,808.73 rows=2,502 width=47) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=50,727.42..50,777.46 rows=2,502 width=47) (actual rows= loops=)

  • Group Key: assess_1.chw, 0
42. 0.000 0.000 ↓ 0.0

Sort (cost=50,727.42..50,733.67 rows=2,502 width=39) (actual rows= loops=)

  • Sort Key: assess_1.chw
43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,385.44..50,586.20 rows=2,502 width=39) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on useview_assessment assess_1 (cost=6,385.01..21,259.47 rows=14,119 width=80) (actual rows= loops=)

  • Recheck Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND (patient_age_in_years < 5) AND (referral_follow_up = 'true'::text))
45. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=6,385.01..6,385.01 rows=14,119 width=0) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_assessment_reported_age_uuid (cost=0.00..2,129.38 rows=85,676 width=0) (actual rows= loops=)

  • Index Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND (patient_age_in_years < 5))
47. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_assessment_referral_follow_up (cost=0.00..4,248.32 rows=403,879 width=0) (actual rows= loops=)

  • Index Cond: (referral_follow_up = 'true'::text)
48. 0.000 0.000 ↓ 0.0

Index Scan using useview_assessment_follow_up_form_source_id on useview_assessment_follow_up follow_up (cost=0.43..2.07 rows=1 width=44) (actual rows= loops=)

  • Index Cond: (form_source_id = assess_1.uuid)
  • Filter: ((date(date_trunc('day'::text, reported)) - date(date_trunc('day'::text, assess_1.reported))) <= 2)
49. 0.000 0.000 ↓ 0.0

Materialize (cost=5,710.70..5,853.97 rows=3,525 width=47) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=5,710.70..5,809.90 rows=3,525 width=47) (actual rows= loops=)

  • Group Key: visit.chw, 0
51. 0.000 0.000 ↓ 0.0

Sort (cost=5,710.70..5,726.69 rows=6,395 width=39) (actual rows= loops=)

  • Sort Key: visit.chw
52. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on useview_pregnancy visit (cost=85.80..5,306.45 rows=6,395 width=39) (actual rows= loops=)

  • Recheck Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
53. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_pregnancy_reported (cost=0.00..84.20 rows=6,395 width=0) (actual rows= loops=)

  • Index Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
54. 0.000 0.000 ↓ 0.0

Sort (cost=61,690.14..61,736.05 rows=18,365 width=48) (actual rows= loops=)

  • Sort Key: familyreg.chw_area_uuid, familyreg.interval_number
55. 0.000 0.000 ↓ 0.0

Subquery Scan on familyreg (cost=59,821.57..60,389.47 rows=18,365 width=48) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=59,821.57..60,205.82 rows=18,365 width=48) (actual rows= loops=)

  • Group Key: contactview_metadata.parent_uuid, 0
57. 0.000 0.000 ↓ 0.0

Sort (cost=59,821.57..59,871.72 rows=20,060 width=40) (actual rows= loops=)

  • Sort Key: contactview_metadata.parent_uuid
58. 0.000 0.000 ↓ 0.0

Index Scan using contactview_metadata_type on contactview_metadata (cost=0.43..58,388.08 rows=20,060 width=40) (actual rows= loops=)

  • Index Cond: (type = 'clinic'::text)
  • Filter: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
59. 0.000 0.000 ↓ 0.0

Materialize (cost=386,123.39..398,406.80 rows=200 width=47) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Subquery Scan on eddnopnc (cost=386,123.39..398,405.80 rows=200 width=47) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=386,123.39..398,403.80 rows=200 width=47) (actual rows= loops=)

  • Group Key: p.chw, 0
62. 0.000 0.000 ↓ 0.0

Sort (cost=386,123.39..389,192.99 rows=1,227,841 width=39) (actual rows= loops=)

  • Sort Key: p.chw
63. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=217,833.64..222,610.14 rows=1,227,841 width=39) (actual rows= loops=)

  • Hash Cond: (p.patient_id = useview_postnatal_care_1.patient_id)
  • Filter: (((max(useview_postnatal_care_1.reported)) IS NULL) OR ((@ ((CASE WHEN (max(pv.new_edd) <> ''::text) THEN (max(pv.new_edd))::date ELSE max(p.edd) END) - ((max(useview_postnatal_care_1.reported)))::date)) > 60))
64. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=195,658.36..199,220.69 rows=6,690 width=75) (actual rows= loops=)

  • Group Key: p.chw, p.patient_id
  • Filter: ((max(p.edd) >= date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval))) AND CASE WHEN (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) = date_trunc('day'::text, now())) THEN (max(p.edd) <= ((date_trunc('month'::text, now()) - '1 day'::interval) - '3 days'::interval)) ELSE (max(p.edd) <= ((date_trunc('month'::text, now()) - '1 day'::interval) + '1 day'::interval)) END)
65. 0.000 0.000 ↓ 0.0

Sort (cost=195,658.36..195,758.70 rows=40,139 width=79) (actual rows= loops=)

  • Sort Key: p.chw, p.patient_id
66. 0.000 0.000 ↓ 0.0

Merge Anti Join (cost=191,986.18..192,589.19 rows=40,139 width=79) (actual rows= loops=)

  • Merge Cond: (p.patient_id = useview_pregnancy_visit_1.patient_id)
67. 0.000 0.000 ↓ 0.0

Sort (cost=105,433.06..105,543.17 rows=44,043 width=79) (actual rows= loops=)

  • Sort Key: p.patient_id
68. 0.000 0.000 ↓ 0.0

Hash Join (cost=77,343.54..100,887.88 rows=44,043 width=79) (actual rows= loops=)

  • Hash Cond: (p.patient_id = pv.patient_id)
  • Join Filter: (p.reported < pv.reported)
69. 0.000 0.000 ↓ 0.0

Seq Scan on useview_pregnancy p (cost=0.00..12,912.50 rows=323,750 width=83) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Hash (cost=75,096.55..75,096.55 rows=105,519 width=48) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Subquery Scan on pv (cost=73,226.12..75,096.55 rows=105,519 width=48) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Unique (cost=73,226.12..74,041.36 rows=105,519 width=80) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Sort (cost=73,226.12..73,633.74 rows=163,048 width=80) (actual rows= loops=)

  • Sort Key: useview_pregnancy_visit.patient_id, useview_pregnancy_visit.reported DESC
74. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on useview_pregnancy_visit (cost=5,709.79..54,866.79 rows=163,048 width=80) (actual rows= loops=)

  • Recheck Cond: ((reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval)) OR (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval)))
  • Filter: (((edd_updated = 'TRUE'::text) AND (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))) OR (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval)))
75. 0.000 0.000 ↓ 0.0

BitmapOr (cost=5,709.79..5,709.79 rows=338,480 width=0) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,916.68 rows=175,432 width=0) (actual rows= loops=)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))
77. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,711.60 rows=163,048 width=0) (actual rows= loops=)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))
78. 0.000 0.000 ↓ 0.0

Sort (cost=86,553.12..86,610.41 rows=22,917 width=44) (actual rows= loops=)

  • Sort Key: useview_pregnancy_visit_1.patient_id, useview_pregnancy_visit_1.reported DESC
79. 0.000 0.000 ↓ 0.0

Append (cost=56,392.15..84,893.45 rows=22,917 width=44) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Unique (cost=56,392.15..56,502.72 rows=20,848 width=44) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Sort (cost=56,392.15..56,447.43 rows=22,114 width=44) (actual rows= loops=)

  • Sort Key: useview_pregnancy_visit_1.patient_id
82. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on useview_pregnancy_visit useview_pregnancy_visit_1 (cost=5,639.33..54,796.33 rows=22,114 width=44) (actual rows= loops=)

  • Recheck Cond: ((reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval)) OR (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval)))
  • Filter: (continue_follow_up <> 'yes'::text)
83. 0.000 0.000 ↓ 0.0

BitmapOr (cost=5,639.33..5,639.33 rows=338,480 width=0) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,916.68 rows=175,432 width=0) (actual rows= loops=)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))
85. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,711.60 rows=163,048 width=0) (actual rows= loops=)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))
86. 0.000 0.000 ↓ 0.0

Unique (cost=28,036.48..28,046.98 rows=2,069 width=44) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Sort (cost=28,036.48..28,041.73 rows=2,100 width=44) (actual rows= loops=)

  • Sort Key: useview_delivery_check.patient_id
88. 0.000 0.000 ↓ 0.0

Seq Scan on useview_delivery_check (cost=0.00..27,920.60 rows=2,100 width=44) (actual rows= loops=)

  • Filter: ((pregnancy_outcome = 'miscarriage'::text) AND ((reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval)) OR (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))))
89. 0.000 0.000 ↓ 0.0

Hash (cost=19,853.41..19,853.41 rows=109,030 width=44) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.42..18,763.11 rows=109,030 width=44) (actual rows= loops=)

  • Group Key: useview_postnatal_care_1.patient_id
91. 0.000 0.000 ↓ 0.0

Index Scan using useview_postnatal_follow_up_count_patient_id on useview_postnatal_care useview_postnatal_care_1 (cost=0.42..16,820.97 rows=170,369 width=44) (actual rows= loops=)

  • Index Cond: (follow_up_count = '1'::text)
92. 0.000 0.000 ↓ 0.0

Materialize (cost=74,895.24..101,638.07 rows=4,698 width=255) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Subquery Scan on assess (cost=74,895.24..101,614.58 rows=4,698 width=255) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=74,895.24..101,567.60 rows=4,698 width=279) (actual rows= loops=)

  • Group Key: useview_assessment.chw, 0
95. 0.000 0.000 ↓ 0.0

Sort (cost=74,895.24..75,126.77 rows=92,610 width=127) (actual rows= loops=)

  • Sort Key: useview_assessment.chw
96. 0.000 0.000 ↓ 0.0

Index Scan using useview_assessment_reported on useview_assessment (cost=0.46..63,731.48 rows=92,610 width=127) (actual rows= loops=)

  • Index Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
97. 0.000 0.000 ↓ 0.0

Materialize (cost=237,232.77..249,908.59 rows=108,388 width=56) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=237,232.77..248,553.74 rows=108,388 width=56) (actual rows= loops=)

  • Group Key: cmeta_1.parent_uuid, 0
99. 0.000 0.000 ↓ 0.0

Sort (cost=237,232.77..239,280.19 rows=818,967 width=76) (actual rows= loops=)

  • Sort Key: cmeta_1.parent_uuid
100. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=58,144.29..114,164.30 rows=818,967 width=76) (actual rows= loops=)

  • Hash Cond: (cmeta_1.uuid = useview_family_survey.family_id)
101. 0.000 0.000 ↓ 0.0

Index Scan using contactview_metadata_type on contactview_metadata cmeta_1 (cost=0.43..31,771.65 rows=818,967 width=72) (actual rows= loops=)

  • Index Cond: (type = 'clinic'::text)
102. 0.000 0.000 ↓ 0.0

Hash (cost=50,597.25..50,597.25 rows=371,489 width=36) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Group (cost=0.42..46,882.36 rows=371,489 width=36) (actual rows= loops=)

  • Group Key: useview_family_survey.family_id
104. 0.000 0.000 ↓ 0.0

Index Only Scan using useview_family_survey_equity_family_id on useview_family_survey (cost=0.42..45,395.71 rows=594,662 width=36) (actual rows= loops=)

  • Index Cond: (is_equity_survey = true)
105. 0.000 0.000 ↓ 0.0

Materialize (cost=26,490.02..26,503.81 rows=200 width=40) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Group (cost=26,490.02..26,501.31 rows=200 width=40) (actual rows= loops=)

  • Group Key: ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[])), 0
107. 0.000 0.000 ↓ 0.0

Sort (cost=26,490.02..26,493.62 rows=1,439 width=36) (actual rows= loops=)

  • Sort Key: ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[]))
108. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.46..26,414.54 rows=1,439 width=36) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Unique (cost=0.04..0.04 rows=2 width=32) (actual rows= loops=)

110. 0.000 0.000 ↓ 0.0

Sort (cost=0.04..0.04 rows=2 width=32) (actual rows= loops=)

  • Sort Key: "*VALUES*".column1
111. 0.000 0.000 ↓ 0.0

Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=32) (actual rows= loops=)

112. 0.000 0.000 ↓ 0.0

Append (cost=0.42..12,903.59 rows=30,186 width=615) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Index Scan using pat_clinic_expr_idx9 on pat_clinic (cost=0.42..3.18 rows=1 width=551) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
114. 0.000 0.000 ↓ 0.0

Seq Scan on pat_data_record_ancr (cost=0.00..2.11 rows=1 width=32) (actual rows= loops=)

  • Filter: (("*VALUES*".column1 = (doc ->> 'form'::text)) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
115. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_ancv_expr_idx9 on pat_data_record_ancv (cost=0.13..2.33 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
116. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_anc_follow_up (cost=16.55..21.51 rows=3 width=1,430) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
117. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=16.55..16.55 rows=3 width=0) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_anc_follow_up_expr_idx9 (cost=0.00..7.92 rows=560 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
119. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_anc_follow_up_f_cast_isots_idx (cost=0.00..8.25 rows=560 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
120. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_assessment (cost=310.28..412.35 rows=62 width=18) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
121. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=310.28..310.28 rows=62 width=0) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_assessment_expr_idx9 (cost=0.00..145.74 rows=12,334 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
123. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_assessment_f_cast_isots_idx (cost=0.00..161.20 rows=12,334 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
124. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_assessment_cbds (cost=4.17..5.82 rows=1 width=18) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
125. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=4.17..4.17 rows=1 width=0) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_assessment_cbds_expr_idx9 (cost=0.00..1.86 rows=63 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
127. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_assessment_cbds_f_cast_isots_idx (cost=0.00..2.04 rows=63 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
128. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_assessment_follow_up (cost=173.82..228.31 rows=33 width=1,060) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
129. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=173.82..173.82 rows=33 width=0) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_assessment_follow_up_expr_idx9 (cost=0.00..85.99 rows=6,568 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
131. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_assessment_follow_up_f_cast_isots_idx (cost=0.00..85.94 rows=6,568 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
132. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_chp_visit (cost=11.97..15.27 rows=2 width=18) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
133. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=11.97..11.97 rows=2 width=0) (actual rows= loops=)

134. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_chp_visit_expr_idx9 (cost=0.00..5.40 rows=371 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
135. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_chp_visit_f_cast_isots_idx (cost=0.00..6.23 rows=371 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
136. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_community_event (cost=9.41..11.07 rows=1 width=872) (actual rows= loops=)

  • Recheck Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND ((doc ->> 'form'::text) = "*VALUES*".column1))
137. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=9.41..9.41 rows=1 width=0) (actual rows= loops=)

138. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_community_event_f_cast_isots_idx (cost=0.00..4.31 rows=289 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
139. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_community_event_expr_idx9 (cost=0.00..4.78 rows=289 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
140. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_community_events (cost=4.25..5.91 rows=1 width=1,307) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
141. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=4.25..4.25 rows=1 width=0) (actual rows= loops=)

142. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_community_events_expr_idx9 (cost=0.00..1.90 rows=68 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
143. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_community_events_f_cast_isots_idx (cost=0.00..2.09 rows=68 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
144. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_death_report_f_cast_isots_idx on pat_data_record_death_report (cost=0.17..2.40 rows=1 width=1,133) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
145. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_death_report_approval_request_f_cast_isots_idx on pat_data_record_death_report_approval_request (cost=0.17..2.40 rows=1 width=1,069) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
146. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_death_report_confirmation_f_cast_isots_idx on pat_data_record_death_report_confirmation (cost=0.17..2.39 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
147. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_delivery_check (cost=54.92..73.08 rows=11 width=1,835) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
148. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=54.92..54.92 rows=11 width=0) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_delivery_check_expr_idx9 (cost=0.00..26.08 rows=2,101 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
150. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_delivery_check_f_cast_isots_idx (cost=0.00..28.06 rows=2,101 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
151. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_ecd_assessment (cost=3.29..4.94 rows=1 width=18) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
152. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.29..3.29 rows=1 width=0) (actual rows= loops=)

153. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_ecd_assessment_expr_idx9 (cost=0.00..1.49 rows=14 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
154. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_ecd_assessment_f_cast_isots_idx (cost=0.00..1.55 rows=14 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
155. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_ecd_follow_up (cost=3.17..4.83 rows=1 width=1,734) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
156. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.17..3.17 rows=1 width=0) (actual rows= loops=)

157. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_ecd_follow_up_expr_idx9 (cost=0.00..1.44 rows=8 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
158. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_ecd_follow_up_f_cast_isots_idx (cost=0.00..1.49 rows=8 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
159. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_family_survey (cost=133.78..176.69 rows=26 width=337) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
160. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=133.78..133.78 rows=26 width=0) (actual rows= loops=)

161. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_family_survey_expr_idx9 (cost=0.00..62.84 rows=5,242 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
162. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_family_survey_f_cast_isots_idx (cost=0.00..69.37 rows=5,242 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
163. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_fp_follow_up_long_term (cost=3.49..5.14 rows=1 width=1,749) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
164. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.49..3.49 rows=1 width=0) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_follow_up_long_term_expr_idx9 (cost=0.00..1.57 rows=25 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
166. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_follow_up_long_term_f_cast_isots_idx (cost=0.00..1.66 rows=25 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
167. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_fp_follow_up_prospective_f_cast_isots_idx on pat_data_record_fp_follow_up_prospective (cost=0.32..1,550.33 rows=7,673 width=249) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
168. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_fp_follow_up_refill (cost=4.63..6.29 rows=1 width=40) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
169. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=4.63..4.63 rows=1 width=0) (actual rows= loops=)

170. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_follow_up_refill_expr_idx9 (cost=0.00..2.06 rows=89 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
171. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_follow_up_refill_f_cast_isots_idx (cost=0.00..2.31 rows=89 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
172. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_fp_follow_up_short_term (cost=7.92..9.57 rows=1 width=1,389) (actual rows= loops=)

  • Recheck Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND ((doc ->> 'form'::text) = "*VALUES*".column1))
173. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=7.92..7.92 rows=1 width=0) (actual rows= loops=)

174. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_follow_up_short_term_f_cast_isots_idx (cost=0.00..3.47 rows=205 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
175. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_follow_up_short_term_expr_idx9 (cost=0.00..4.15 rows=205 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
176. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_fp_visit (cost=12.22..15.51 rows=2 width=20) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
177. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=12.22..12.22 rows=2 width=0) (actual rows= loops=)

178. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_visit_expr_idx9 (cost=0.00..5.51 rows=385 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
179. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_fp_visit_f_cast_isots_idx (cost=0.00..6.37 rows=385 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
180. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_home_visit_f_cast_isots_idx on pat_data_record_home_visit (cost=0.45..1,685.00 rows=1,514 width=1,286) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
181. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_household_mute_f_cast_isots_idx on pat_data_record_household_mute (cost=0.30..4.78 rows=3 width=1,819) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
182. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_household_mute_task_f_cast_isots_idx on pat_data_record_household_mute_task (cost=0.30..100.83 rows=339 width=1,903) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
183. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_hub_spoke (cost=3.61..5.26 rows=1 width=1,190) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
184. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.61..3.61 rows=1 width=0) (actual rows= loops=)

185. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_hub_spoke_expr_idx9 (cost=0.00..1.62 rows=32 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
186. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_hub_spoke_f_cast_isots_idx (cost=0.00..1.73 rows=32 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
187. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_immunization_follow_up (cost=12.31..15.61 rows=2 width=1,250) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
188. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=12.31..12.31 rows=2 width=0) (actual rows= loops=)

189. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_immunization_follow_up_expr_idx9 (cost=0.00..5.54 rows=390 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
190. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_immunization_follow_up_f_cast_isots_idx (cost=0.00..6.42 rows=390 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
191. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_immunization_ug_f_cast_isots_idx on pat_data_record_immunization_ug (cost=0.32..6,469.86 rows=15,771 width=1,791) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
192. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_immunization_ug_follow_up_f_cast_isots_idx on pat_data_record_immunization_ug_follow_up (cost=0.31..1,505.10 rows=4,661 width=1,485) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
193. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_it_support (cost=3.59..5.25 rows=1 width=1,005) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
194. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.59..3.59 rows=1 width=0) (actual rows= loops=)

195. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_it_support_expr_idx9 (cost=0.00..1.61 rows=31 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
196. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_it_support_f_cast_isots_idx (cost=0.00..1.72 rows=31 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
197. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_mini_hub (cost=3.12..4.77 rows=1 width=1,218) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
198. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.12..3.12 rows=1 width=0) (actual rows= loops=)

199. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_mini_hub_expr_idx9 (cost=0.00..1.41 rows=5 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
200. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_mini_hub_f_cast_isots_idx (cost=0.00..1.45 rows=5 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
201. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_muac_follow_up (cost=7.02..8.67 rows=1 width=1,358) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
202. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=7.02..7.02 rows=1 width=0) (actual rows= loops=)

203. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_muac_follow_up_expr_idx9 (cost=0.00..3.13 rows=216 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
204. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_muac_follow_up_f_cast_isots_idx (cost=0.00..3.58 rows=216 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
205. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_mute_person_f_cast_isots_idx on pat_data_record_mute_person (cost=0.17..2.40 rows=1 width=1,588) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
206. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_muting_approve_request_f_cast_isots_idx on pat_data_record_muting_approve_request (cost=0.30..5.90 rows=4 width=842) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
207. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_muting_approved_f_cast_isots_idx on pat_data_record_muting_approved (cost=0.17..2.40 rows=1 width=952) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
208. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_nutrition_assessment (cost=42.00..53.56 rows=7 width=1,740) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
209. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=42.00..42.00 rows=7 width=0) (actual rows= loops=)

210. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_nutrition_assessment_expr_idx9 (cost=0.00..20.45 rows=1,497 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
211. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_nutrition_assessment_f_cast_isots_idx (cost=0.00..20.92 rows=1,497 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
212. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_ovc_survey (cost=3.19..4.85 rows=1 width=623) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
213. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.19..3.19 rows=1 width=0) (actual rows= loops=)

214. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_ovc_survey_expr_idx9 (cost=0.00..1.45 rows=9 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
215. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_ovc_survey_f_cast_isots_idx (cost=0.00..1.50 rows=9 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
216. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_postnatal_care (cost=49.65..64.49 rows=9 width=170) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
217. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=49.65..49.65 rows=9 width=0) (actual rows= loops=)

218. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_postnatal_care_expr_idx9 (cost=0.00..23.22 rows=1,866 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
219. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_postnatal_care_f_cast_isots_idx (cost=0.00..25.71 rows=1,866 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
220. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_postnatal_care_cbds (cost=3.25..4.90 rows=1 width=20) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
221. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=3.25..3.25 rows=1 width=0) (actual rows= loops=)

222. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_postnatal_care_cbds_expr_idx9 (cost=0.00..1.47 rows=12 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
223. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_postnatal_care_cbds_f_cast_isots_idx (cost=0.00..1.53 rows=12 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
224. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_pregnancy (cost=44.32..57.51 rows=8 width=59) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
225. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=44.32..44.32 rows=8 width=0) (actual rows= loops=)

226. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_pregnancy_expr_idx9 (cost=0.00..20.80 rows=1,690 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
227. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_pregnancy_f_cast_isots_idx (cost=0.00..22.85 rows=1,690 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
228. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_pregnancy_referral_follow_up (cost=11.60..14.90 rows=2 width=898) (actual rows= loops=)

  • Recheck Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND ((doc ->> 'form'::text) = "*VALUES*".column1))
229. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=11.60..11.60 rows=2 width=0) (actual rows= loops=)

230. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_pregnancy_referral_follow_up_f_cast_isots_idx (cost=0.00..4.92 rows=350 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
231. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_pregnancy_referral_follow_up_expr_idx9 (cost=0.00..6.34 rows=350 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
232. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_pregnancy_visit (cost=86.66..114.65 rows=17 width=23) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
233. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=86.66..86.66 rows=17 width=0) (actual rows= loops=)

234. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_pregnancy_visit_expr_idx9 (cost=0.00..40.64 rows=3,455 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
235. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_pregnancy_visit_f_cast_isots_idx (cost=0.00..44.90 rows=3,455 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
236. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_prophylaxis_follow_up (cost=12.43..15.74 rows=2 width=1,413) (actual rows= loops=)

  • Recheck Cond: (((doc ->> 'form'::text) = "*VALUES*".column1) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
237. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=12.43..12.43 rows=2 width=0) (actual rows= loops=)

238. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_prophylaxis_follow_up_expr_idx9 (cost=0.00..5.60 rows=397 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
239. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_prophylaxis_follow_up_f_cast_isots_idx (cost=0.00..6.49 rows=397 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
240. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_symptom_report_expr_idx9 on pat_data_record_symptom_report (cost=0.14..2.35 rows=1 width=18) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
241. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pat_data_record_u1_follow_up (cost=9.54..11.19 rows=1 width=1,099) (actual rows= loops=)

  • Recheck Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND ((doc ->> 'form'::text) = "*VALUES*".column1))
242. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=9.54..9.54 rows=1 width=0) (actual rows= loops=)

243. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_u1_follow_up_f_cast_isots_idx (cost=0.00..4.38 rows=296 width=0) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
244. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pat_data_record_u1_follow_up_expr_idx9 (cost=0.00..4.83 rows=296 width=0) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
245. 0.000 0.000 ↓ 0.0

Index Scan using pat_data_record_default_f_cast_isots_idx on pat_data_record_default (cost=0.17..2.39 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
  • Filter: ("*VALUES*".column1 = (doc ->> 'form'::text))
246. 0.000 0.000 ↓ 0.0

Index Scan using pat_district_hospital_expr_idx9 on pat_district_hospital (cost=0.14..2.89 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
247. 0.000 0.000 ↓ 0.0

Index Scan using pat_feedback_expr_idx9 on pat_feedback (cost=0.28..3.04 rows=1 width=682) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
248. 0.000 0.000 ↓ 0.0

Index Scan using pat_form_expr_idx9 on pat_form (cost=0.14..2.90 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
249. 0.000 0.000 ↓ 0.0

Index Scan using pat_health_center_expr_idx9 on pat_health_center (cost=0.28..3.04 rows=1 width=678) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
250. 0.000 0.000 ↓ 0.0

Index Scan using pat_info_expr_idx9 on pat_info (cost=0.43..3.19 rows=1 width=293) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
251. 0.000 0.000 ↓ 0.0

Seq Scan on pat_meta (cost=0.00..1.55 rows=1 width=32) (actual rows= loops=)

  • Filter: (("*VALUES*".column1 = (doc ->> 'form'::text)) AND (f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
252. 0.000 0.000 ↓ 0.0

Index Scan using pat_person_expr_idx9 on pat_person (cost=0.43..3.19 rows=1 width=638) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
253. 0.000 0.000 ↓ 0.0

Index Scan using pat_traffic_stats_expr_idx9 on pat_traffic_stats (cost=0.28..3.04 rows=1 width=599) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
254. 0.000 0.000 ↓ 0.0

Index Scan using pat_usage_stats_expr_idx9 on pat_usage_stats (cost=0.14..2.90 rows=1 width=1,078) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
255. 0.000 0.000 ↓ 0.0

Index Scan using couchdb_default_expr_idx9 on couchdb_default (cost=0.42..3.18 rows=1 width=808) (actual rows= loops=)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
  • Filter: ((f_cast_isots((doc ->> 'reported_date'::text)) >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (f_cast_isots((doc ->> 'reported_date'::text)) < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
256. 0.000 0.000 ↓ 0.0

Hash (cost=4,451.36..4,451.36 rows=2,010 width=47) (actual rows= loops=)

257. 0.000 0.000 ↓ 0.0

Subquery Scan on communityevent (cost=4,385.19..4,451.36 rows=2,010 width=47) (actual rows= loops=)

258. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=4,385.19..4,431.26 rows=2,010 width=47) (actual rows= loops=)

  • Group Key: meta.chw, 0
259. 0.000 0.000 ↓ 0.0

Sort (cost=4,385.19..4,391.68 rows=2,597 width=39) (actual rows= loops=)

  • Sort Key: meta.chw
260. 0.000 0.000 ↓ 0.0

Index Scan using form_metadata_formname on form_metadata meta (cost=0.56..4,237.91 rows=2,597 width=39) (actual rows= loops=)

  • Index Cond: (formname = 'community_event'::text)
  • Filter: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
261. 0.000 0.000 ↓ 0.0

Index Scan using contactview_chp_uuid on contactview_chp chp (cost=0.28..563.65 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (uuid = chwlist.chw_uuid)
262.          

SubPlan (for Index Scan)

263. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=0.56..1,894.74 rows=6 width=0) (actual rows= loops=)

  • Join Filter: (meta_1.formname = "*VALUES*_1".column1)
264. 0.000 0.000 ↓ 0.0

Index Scan using form_metadata_chw on form_metadata meta_1 (cost=0.56..1,891.32 rows=75 width=14) (actual rows= loops=)

  • Index Cond: (chw = chp.uuid)
  • Filter: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
265. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..0.05 rows=3 width=32) (actual rows= loops=)

266. 0.000 0.000 ↓ 0.0

Values Scan on "*VALUES*_1" (cost=0.00..0.04 rows=3 width=32) (actual rows= loops=)

267. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.62..46,603.10 rows=28,006 width=35) (actual rows= loops=)

268. 0.000 0.000 ↓ 0.0

Unique (cost=0.06..0.08 rows=3 width=32) (actual rows= loops=)

269. 0.000 0.000 ↓ 0.0

Sort (cost=0.06..0.07 rows=3 width=32) (actual rows= loops=)

  • Sort Key: "*VALUES*_2".column1
270. 0.000 0.000 ↓ 0.0

Values Scan on "*VALUES*_2" (cost=0.00..0.04 rows=3 width=32) (actual rows= loops=)

271. 0.000 0.000 ↓ 0.0

Index Scan using form_metadata_formname on form_metadata meta_2 (cost=0.56..15,440.99 rows=9,335 width=49) (actual rows= loops=)

  • Index Cond: (formname = "*VALUES*_2".column1)
  • Filter: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
272. 0.000 0.000 ↓ 0.0

Index Scan using contactview_metadata_parent_uuid on contactview_metadata clinic (cost=0.56..36.15 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (parent_uuid = chp.area_uuid)
  • Filter: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
273. 0.000 0.000 ↓ 0.0

Index Scan using useview_postnatal_reported_chw_patient_id on useview_postnatal_care pnc (cost=0.45..208.74 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone) AND (chw = chp.uuid))
  • Filter: (follow_up_count = '1'::text)
274. 0.000 0.000 ↓ 0.0

Index Scan using useview_postnatal_care_count_reported_uuid on useview_postnatal_care pnc_1 (cost=0.45..3,071.66 rows=3,474 width=35) (actual rows= loops=)

  • Index Cond: ((follow_up_count = '1'::text) AND (reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
275. 0.000 0.000 ↓ 0.0

Hash (cost=4,533.91..4,533.91 rows=1,762 width=47) (actual rows= loops=)

276. 0.000 0.000 ↓ 0.0

Subquery Scan on fp (cost=4,204.21..4,533.91 rows=1,762 width=47) (actual rows= loops=)

277. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=4,204.21..4,516.29 rows=1,762 width=47) (actual rows= loops=)

  • Group Key: visit_1.chw, 0
278. 0.000 0.000 ↓ 0.0

Sort (cost=4,204.21..4,246.28 rows=16,826 width=81) (actual rows= loops=)

  • Sort Key: visit_1.chw
279. 0.000 0.000 ↓ 0.0

Index Scan using useview_fp_visit_reported_xmlforms_uuid on useview_fp_visit visit_1 (cost=0.45..3,023.16 rows=16,826 width=81) (actual rows= loops=)

  • Index Cond: ((reported >= (date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 mon'::interval)))::timestamp without time zone) AND (reported < ((date_trunc('day'::text, (date_trunc('month'::text, now()) - '1 day'::interval)) + '1 day'::interval))::timestamp without time zone))
280. 0.000 0.000 ↓ 0.0

Materialize (cost=0.56..428,625.63 rows=5,871 width=47) (actual rows= loops=)

281. 0.000 0.000 ↓ 0.0

Subquery Scan on sync (cost=0.56..428,596.27 rows=5,871 width=47) (actual rows= loops=)

282. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.56..428,537.56 rows=5,871 width=47) (actual rows= loops=)

  • Group Key: useview_chp_sync.chw_uuid, 0
283. 0.000 0.000 ↓ 0.0

Index Only Scan using useview_chp_sync_chw_uuid_latest_replication_date on useview_chp_sync (cost=0.56..360,103.21 rows=9,108,924 width=47) (actual rows= loops=)