explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q2EE

Settings
# exclusive inclusive rows x rows loops node
1. 119.478 94,465.496 ↓ 1,199.8 5,999 1

GroupAggregate (cost=1,307,669.34..1,307,674.16 rows=5 width=389) (actual time=94,344.671..94,465.496 rows=5,999 loops=1)

  • 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: 696
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 160.826 ms, Inlining 104.019 ms, Optimization 8297.864 ms, Emission 5831.581 ms, Total 14394.289 ms
2. 56.219 94,346.018 ↓ 428.5 5,999 1

Sort (cost=1,307,669.34..1,307,669.37 rows=14 width=553) (actual time=94,344.566..94,346.018 rows=5,999 loops=1)

  • 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
  • Sort Method: quicksort Memory: 3771kB
3. 16.407 94,289.799 ↓ 428.5 5,999 1

Hash Left Join (cost=1,272,419.04..1,307,669.07 rows=14 width=553) (actual time=38,076.326..94,289.799 rows=5,999 loops=1)

  • Hash Cond: ((chwlist.chw_uuid = sync.chw_uuid) AND (chwlist.interval_number = sync.interval_number))
4. 15.736 88,340.741 ↓ 428.5 5,999 1

Merge Left Join (cost=967,092.36..1,002,342.28 rows=14 width=549) (actual time=32,143.642..88,340.741 rows=5,999 loops=1)

  • Merge Cond: (chwlist.chw_uuid = visit_1.chw)
  • Join Filter: ((0) = chwlist.interval_number)
5. 1,627.473 86,832.841 ↓ 428.5 5,999 1

Nested Loop Left Join (cost=962,312.03..997,102.70 rows=14 width=541) (actual time=30,693.074..86,832.841 rows=5,999 loops=1)

  • Join Filter: ((chp_visits.chw_area_uuid = chwlist.chw_area_uuid) AND (chp_visits.interval_number = chwlist.interval_number))
  • Rows Removed by Join Filter: 14108588
6. 22.988 83,897.586 ↓ 428.5 5,999 1

Nested Loop Left Join (cost=526,846.15..561,549.30 rows=14 width=573) (actual time=30,562.330..83,897.586 rows=5,999 loops=1)

  • Join Filter: (chwlist.interval_number = 0)
7. 7.993 32,229.207 ↓ 428.5 5,999 1

Merge Left Join (cost=526,845.86..554,479.01 rows=14 width=569) (actual time=30,556.441..32,229.207 rows=5,999 loops=1)

  • Merge Cond: ((chwlist.chw_uuid = communityevent.chw_uuid) AND (chwlist.interval_number = communityevent.interval_number))
8. 12.179 32,100.142 ↓ 428.5 5,999 1

Merge Left Join (cost=522,239.92..549,857.41 rows=14 width=561) (actual time=30,435.595..32,100.142 rows=5,999 loops=1)

  • Merge Cond: (chwlist.chw_uuid = assess.chw)
  • Join Filter: (chwlist.interval_number = (0))
9. 15.643 30,758.772 ↓ 428.5 5,999 1

Merge Left Join (cost=471,592.49..499,109.86 rows=14 width=553) (actual time=29,122.384..30,758.772 rows=5,999 loops=1)

  • Merge Cond: (chwlist.chw_uuid = useview_assessment.chw)
  • Join Filter: (chwlist.interval_number = (0))
10. 15.529 26,673.204 ↓ 428.5 5,999 1

Merge Left Join (cost=403,657.55..403,659.16 rows=14 width=337) (actual time=26,653.366..26,673.204 rows=5,999 loops=1)

  • Merge Cond: ((chwlist.chw_uuid = eddnopnc.chw_uuid) AND (chwlist.interval_number = eddnopnc.interval_number))
11. 27.815 19,747.887 ↓ 428.5 5,999 1

Sort (cost=186,687.30..186,687.34 rows=14 width=329) (actual time=19,744.488..19,747.887 rows=5,999 loops=1)

  • Sort Key: chwlist.chw_uuid, chwlist.interval_number
  • Sort Method: quicksort Memory: 3059kB
12. 5.163 19,720.072 ↓ 428.5 5,999 1

Hash Right Join (cost=183,706.14..186,687.03 rows=14 width=329) (actual time=19,711.839..19,720.072 rows=5,999 loops=1)

  • Hash Cond: ((cmeta.parent_uuid = chwlist.chw_area_uuid) AND ((0) = chwlist.interval_number))
13. 377.392 2,304.056 ↑ 17.4 6,220 1

HashAggregate (cost=107,937.86..109,021.77 rows=108,391 width=56) (actual time=2,300.956..2,304.056 rows=6,220 loops=1)

  • Group Key: cmeta.parent_uuid, 0
14. 609.042 1,926.664 ↑ 1.0 814,727 1

Hash Left Join (cost=56,710.12..99,557.53 rows=838,033 width=76) (actual time=997.264..1,926.664 rows=814,727 loops=1)

  • Hash Cond: (cmeta.uuid = useview_family_survey.family_id)
15. 321.770 321.770 ↑ 1.0 814,727 1

Index Scan using contactview_metadata_type on contactview_metadata cmeta (cost=0.43..40,648.01 rows=838,033 width=72) (actual time=0.044..321.770 rows=814,727 loops=1)

  • Index Cond: (type = 'clinic'::text)
16. 173.046 995.852 ↓ 1.2 490,471 1

Hash (cost=51,691.74..51,691.74 rows=401,436 width=36) (actual time=995.852..995.852 rows=490,471 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 37146kB
17. 458.312 822.806 ↓ 1.2 490,471 1

HashAggregate (cost=43,663.02..47,677.38 rows=401,436 width=36) (actual time=683.310..822.806 rows=490,471 loops=1)

  • Group Key: useview_family_survey.family_id
18. 364.494 364.494 ↑ 1.0 630,162 1

Seq Scan on useview_family_survey (cost=0.00..42,056.52 rows=642,599 width=36) (actual time=0.047..364.494 rows=630,162 loops=1)

  • Filter: is_equity_survey
  • Rows Removed by Filter: 428135
19. 4.505 17,410.853 ↓ 1,199.8 5,999 1

Hash (cost=75,768.21..75,768.21 rows=5 width=277) (actual time=17,410.852..17,410.853 rows=5,999 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1704kB
20. 3.099 17,406.348 ↓ 1,199.8 5,999 1

Hash Right Join (cost=75,252.45..75,768.21 rows=5 width=277) (actual time=17,402.204..17,406.348 rows=5,999 loops=1)

  • Hash Cond: ((contactview_metadata.parent_uuid = chwlist.chw_area_uuid) AND ((0) = chwlist.interval_number))
21. 19.720 1,656.334 ↑ 6.5 2,883 1

HashAggregate (cost=68,038.03..68,225.57 rows=18,754 width=48) (actual time=1,655.265..1,656.334 rows=2,883 loops=1)

  • Group Key: contactview_metadata.parent_uuid, 0
22. 1,636.614 1,636.614 ↓ 1.4 29,670 1

Index Scan using contactview_metadata_type on contactview_metadata (cost=0.43..67,884.08 rows=20,527 width=40) (actual time=0.201..1,636.614 rows=29,670 loops=1)

  • 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))
  • Rows Removed by Filter: 785057
23. 4.619 15,746.915 ↓ 1,199.8 5,999 1

Hash (cost=7,214.34..7,214.34 rows=5 width=269) (actual time=15,746.915..15,746.915 rows=5,999 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1677kB
24. 3.282 15,742.296 ↓ 1,199.8 5,999 1

Hash Right Join (cost=7,128.23..7,214.34 rows=5 width=269) (actual time=15,737.944..15,742.296 rows=5,999 loops=1)

  • Hash Cond: ((visit.chw = chwlist.chw_uuid) AND ((0) = chwlist.interval_number))
25. 6.873 44.369 ↑ 1.0 3,072 1

HashAggregate (cost=4,152.06..4,183.37 rows=3,131 width=47) (actual time=43.276..44.369 rows=3,072 loops=1)

  • Group Key: visit.chw, 0
26. 37.496 37.496 ↓ 1.9 9,627 1

Index Scan using useview_pregnancy_reported on useview_pregnancy visit (cost=0.45..4,113.94 rows=5,083 width=39) (actual time=0.128..37.496 rows=9,627 loops=1)

  • 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))
27. 4.483 15,694.645 ↓ 1,199.8 5,999 1

Hash (cost=2,976.09..2,976.09 rows=5 width=261) (actual time=15,694.645..15,694.645 rows=5,999 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1646kB
28. 2.998 15,690.162 ↓ 1,199.8 5,999 1

Hash Right Join (cost=2,918.72..2,976.09 rows=5 width=261) (actual time=15,685.978..15,690.162 rows=5,999 loops=1)

  • Hash Cond: ((useview_postnatal_care.chw = chwlist.chw_uuid) AND ((0) = chwlist.interval_number))
29. 32.048 1,288.841 ↓ 1.3 2,625 1

HashAggregate (cost=2,612.68..2,633.54 rows=2,086 width=87) (actual time=1,287.633..1,288.841 rows=2,625 loops=1)

  • Group Key: useview_postnatal_care.chw, 0
30. 1,256.793 1,256.793 ↓ 2.0 5,778 1

Index Scan using useview_postnatal_care_count_reported_uuid on useview_postnatal_care (cost=0.45..2,381.80 rows=2,886 width=61) (actual time=1.212..1,256.793 rows=5,778 loops=1)

  • 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))
31. 3.150 14,398.323 ↓ 1,199.8 5,999 1

Hash (cost=305.96..305.96 rows=5 width=213) (actual time=14,398.323..14,398.323 rows=5,999 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1481kB
32. 0.890 14,395.173 ↓ 1,199.8 5,999 1

Subquery Scan on chwlist (cost=264.61..305.96 rows=5 width=213) (actual time=14,393.104..14,395.173 rows=5,999 loops=1)

33. 1.248 14,394.283 ↓ 1,199.8 5,999 1

Hash Join (cost=264.61..305.91 rows=5 width=213) (actual time=14,393.100..14,394.283 rows=5,999 loops=1)

  • Hash Cond: ((row_number() OVER (?)) = (row_number() OVER (?)))
34. 0.012 14,241.998 ↑ 1,000.0 1 1

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

35. 0.024 14,241.986 ↑ 1,000.0 1 1

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

  • Sort Key: generate_series.generate_series
  • Sort Method: quicksort Memory: 25kB
36. 14,241.962 14,241.962 ↑ 1,000.0 1 1

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

37. 4.459 151.037 ↓ 5,999.0 5,999 1

Hash (cost=204.75..204.75 rows=1 width=213) (actual time=151.036..151.037 rows=5,999 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1481kB
38. 6.546 146.578 ↓ 5,999.0 5,999 1

Nested Loop (cost=1.62..204.75 rows=1 width=213) (actual time=0.164..146.578 rows=5,999 loops=1)

39. 5.901 128.034 ↓ 5,999.0 5,999 1

Nested Loop Anti Join (cost=1.55..204.64 rows=1 width=201) (actual time=0.131..128.034 rows=5,999 loops=1)

40. 7.096 92.397 ↓ 7,434.0 7,434 1

Nested Loop (cost=1.27..204.32 rows=1 width=201) (actual time=0.085..92.397 rows=7,434 loops=1)

41. 2.774 10.631 ↓ 7,467.0 7,467 1

Nested Loop (cost=0.71..201.95 rows=1 width=185) (actual time=0.058..10.631 rows=7,467 loops=1)

42. 0.060 0.060 ↓ 23.0 23 1

Index Scan using contactview_metadata_type on contactview_metadata cmd (cost=0.43..2.45 rows=1 width=52) (actual time=0.029..0.060 rows=23 loops=1)

  • Index Cond: (type = 'district_hospital'::text)
  • Filter: ((name <> 'HQ'::text) AND (name <> 'HQ OVC'::text))
  • Rows Removed by Filter: 2
43. 7.797 7.797 ↓ 1.0 325 23

Index Scan using contactview_chp_branch_uuid on contactview_chp chp_1 (cost=0.28..196.39 rows=310 width=166) (actual time=0.014..0.339 rows=325 loops=23)

  • Index Cond: (branch_uuid = cmd.uuid)
44. 74.670 74.670 ↑ 1.0 1 7,467

Index Scan using contactview_metadata_uuid on contactview_metadata cmeta_1 (cost=0.56..2.37 rows=1 width=52) (actual time=0.010..0.010 rows=1 loops=7,467)

  • Index Cond: (uuid = chp_1.supervisor_uuid)
45. 29.736 29.736 ↓ 0.0 0 7,434

Index Only Scan using chp_muting_chw on chp_muting (cost=0.28..0.30 rows=1 width=36) (actual time=0.004..0.004 rows=0 loops=7,434)

  • Index Cond: (chw = chp_1.uuid)
  • Heap Fetches: 0
46. 11.998 11.998 ↑ 1.0 1 5,999

WindowAgg (cost=0.07..0.09 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=5,999)

47. 0.000 0.000 ↑ 1.0 1 5,999

Sort (cost=0.07..0.08 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=5,999)

  • Sort Key: generate_series_1.generate_series
  • Sort Method: quicksort Memory: 25kB
48. 0.017 0.017 ↑ 1.0 1 1

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

49. 4.557 6,909.788 ↓ 7.3 1,463 1

Sort (cost=216,970.25..216,970.75 rows=200 width=47) (actual time=6,908.830..6,909.788 rows=1,463 loops=1)

  • Sort Key: eddnopnc.chw_uuid, eddnopnc.interval_number
  • Sort Method: quicksort Memory: 239kB
50. 0.239 6,905.231 ↓ 7.3 1,463 1

Subquery Scan on eddnopnc (cost=216,958.60..216,962.60 rows=200 width=47) (actual time=6,904.564..6,905.231 rows=1,463 loops=1)

51. 2.366 6,904.992 ↓ 7.3 1,463 1

HashAggregate (cost=216,958.60..216,960.60 rows=200 width=47) (actual time=6,904.560..6,904.992 rows=1,463 loops=1)

  • Group Key: p.chw, 0
52. 5.126 6,902.626 ↑ 557.3 2,317 1

Hash Left Join (cost=204,459.08..207,274.42 rows=1,291,224 width=39) (actual time=6,773.212..6,902.626 rows=2,317 loops=1)

  • 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))
  • Rows Removed by Filter: 3812
53. 178.427 2,659.502 ↑ 1.1 6,129 1

HashAggregate (cost=183,957.56..186,685.54 rows=6,863 width=75) (actual time=2,535.050..2,659.502 rows=6,129 loops=1)

  • 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)
  • Rows Removed by Filter: 51241
54. 46.289 2,481.075 ↓ 1.6 65,586 1

Merge Anti Join (cost=182,511.57..183,134.02 rows=41,177 width=79) (actual time=2,414.020..2,481.075 rows=65,586 loops=1)

  • Merge Cond: (p.patient_id = useview_pregnancy_visit_1.patient_id)
55. 345.732 1,943.748 ↓ 1.8 83,207 1

Sort (cost=91,459.66..91,572.74 rows=45,234 width=79) (actual time=1,924.751..1,943.748 rows=83,207 loops=1)

  • Sort Key: p.patient_id
  • Sort Method: quicksort Memory: 14773kB
56. 166.484 1,598.016 ↓ 1.8 83,207 1

Hash Join (cost=73,889.47..87,961.91 rows=45,234 width=79) (actual time=1,257.423..1,598.016 rows=83,207 loops=1)

  • Hash Cond: (p.patient_id = pv.patient_id)
  • Join Filter: (p.reported < pv.reported)
  • Rows Removed by Join Filter: 784
57. 174.558 174.558 ↑ 1.0 329,992 1

Seq Scan on useview_pregnancy p (cost=0.00..13,203.45 rows=331,045 width=83) (actual time=0.012..174.558 rows=329,992 loops=1)

58. 21.856 1,256.974 ↑ 1.5 72,083 1

Hash (cost=72,534.82..72,534.82 rows=108,372 width=48) (actual time=1,256.974..1,256.974 rows=72,083 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 7288kB
59. 10.129 1,235.118 ↑ 1.5 72,083 1

Subquery Scan on pv (cost=70,613.81..72,534.82 rows=108,372 width=48) (actual time=1,164.340..1,235.118 rows=72,083 loops=1)

60. 29.363 1,224.989 ↑ 1.5 72,083 1

Unique (cost=70,613.81..71,451.10 rows=108,372 width=80) (actual time=1,164.320..1,224.989 rows=72,083 loops=1)

61. 698.770 1,195.626 ↓ 1.1 182,208 1

Sort (cost=70,613.81..71,032.46 rows=167,457 width=80) (actual time=1,164.318..1,195.626 rows=182,208 loops=1)

  • Sort Key: useview_pregnancy_visit.patient_id, useview_pregnancy_visit.reported DESC
  • Sort Method: quicksort Memory: 31768kB
62. 442.582 496.856 ↓ 1.1 182,208 1

Bitmap Heap Scan on useview_pregnancy_visit (cost=5,597.85..56,084.05 rows=167,457 width=80) (actual time=59.305..496.856 rows=182,208 loops=1)

  • 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)))
  • Rows Removed by Filter: 12126
  • Heap Blocks: exact=23587
63. 0.004 54.274 ↓ 0.0 0 1

BitmapOr (cost=5,597.85..5,597.85 rows=347,632 width=0) (actual time=54.274..54.274 rows=0 loops=1)

64. 36.027 36.027 ↓ 1.1 194,343 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,857.76 rows=180,176 width=0) (actual time=36.027..36.027 rows=194,343 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))
65. 18.243 18.243 ↓ 1.1 182,217 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,656.36 rows=167,457 width=0) (actual time=18.243..18.243 rows=182,217 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))
66. 80.845 491.038 ↑ 1.5 15,816 1

Sort (cost=91,051.92..91,111.20 rows=23,714 width=44) (actual time=489.227..491.038 rows=15,816 loops=1)

  • Sort Key: useview_pregnancy_visit_1.patient_id, useview_pregnancy_visit_1.reported DESC
  • Sort Method: quicksort Memory: 1620kB
67. 2.079 410.193 ↑ 1.5 15,816 1

Append (cost=57,655.02..89,328.68 rows=23,714 width=44) (actual time=220.065..410.193 rows=15,816 loops=1)

68. 4.991 227.775 ↑ 1.4 15,801 1

Unique (cost=57,655.02..57,768.58 rows=21,412 width=44) (actual time=220.064..227.775 rows=15,801 loops=1)

69. 51.152 222.784 ↑ 1.4 16,434 1

Sort (cost=57,655.02..57,711.80 rows=22,712 width=44) (actual time=220.062..222.784 rows=16,434 loops=1)

  • Sort Key: useview_pregnancy_visit_1.patient_id
  • Sort Method: quicksort Memory: 2052kB
70. 132.886 171.632 ↑ 1.4 16,434 1

Bitmap Heap Scan on useview_pregnancy_visit useview_pregnancy_visit_1 (cost=5,525.47..56,011.67 rows=22,712 width=44) (actual time=43.775..171.632 rows=16,434 loops=1)

  • 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)
  • Rows Removed by Filter: 177900
  • Heap Blocks: exact=23587
71. 0.005 38.746 ↓ 0.0 0 1

BitmapOr (cost=5,525.47..5,525.47 rows=347,632 width=0) (actual time=38.746..38.746 rows=0 loops=1)

72. 20.064 20.064 ↓ 1.1 194,343 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,857.76 rows=180,176 width=0) (actual time=20.064..20.064 rows=194,343 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))
73. 18.677 18.677 ↓ 1.1 182,217 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,656.36 rows=167,457 width=0) (actual time=18.677..18.677 rows=182,217 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))
74. 0.024 180.339 ↑ 153.5 15 1

Unique (cost=31,192.71..31,204.40 rows=2,302 width=44) (actual time=180.314..180.339 rows=15 loops=1)

75. 0.053 180.315 ↑ 123.0 19 1

Sort (cost=31,192.71..31,198.55 rows=2,337 width=44) (actual time=180.312..180.315 rows=19 loops=1)

  • Sort Key: useview_delivery_check.patient_id
  • Sort Method: quicksort Memory: 26kB
76. 180.262 180.262 ↑ 123.0 19 1

Seq Scan on useview_delivery_check (cost=0.00..31,061.95 rows=2,337 width=44) (actual time=1.813..180.262 rows=19 loops=1)

  • 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))))
  • Rows Removed by Filter: 436718
77. 83.008 4,237.998 ↓ 1.4 152,864 1

Hash (cost=19,104.42..19,104.42 rows=111,768 width=44) (actual time=4,237.998..4,237.998 rows=152,864 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 13991kB
78. 151.996 4,154.990 ↓ 1.4 152,864 1

GroupAggregate (cost=0.42..17,986.74 rows=111,768 width=44) (actual time=91.514..4,154.990 rows=152,864 loops=1)

  • Group Key: useview_postnatal_care_1.patient_id
79. 4,002.994 4,002.994 ↑ 1.0 173,817 1

Index Scan using useview_postnatal_follow_up_count_patient_id on useview_postnatal_care useview_postnatal_care_1 (cost=0.42..15,995.82 rows=174,647 width=44) (actual time=0.080..4,002.994 rows=173,817 loops=1)

  • Index Cond: (follow_up_count = '1'::text)
80. 8.895 4,069.925 ↑ 1.3 3,739 1

Materialize (cost=67,934.95..95,434.80 rows=4,698 width=255) (actual time=2,469.006..4,069.925 rows=3,739 loops=1)

81. 1,548.962 4,061.030 ↑ 1.3 3,739 1

GroupAggregate (cost=67,934.95..95,376.08 rows=4,698 width=279) (actual time=2,468.994..4,061.030 rows=3,739 loops=1)

  • Group Key: useview_assessment.chw, 0
82. 536.520 2,512.068 ↓ 1.6 156,200 1

Sort (cost=67,934.95..68,173.16 rows=95,284 width=127) (actual time=2,468.705..2,512.068 rows=156,200 loops=1)

  • Sort Key: useview_assessment.chw
  • Sort Method: quicksort Memory: 47635kB
83. 1,975.548 1,975.548 ↓ 1.6 156,200 1

Index Scan using useview_assessment_reported on useview_assessment (cost=0.46..60,054.98 rows=95,284 width=127) (actual time=0.127..1,975.548 rows=156,200 loops=1)

  • 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))
84. 1.984 1,329.191 ↑ 1.1 2,576 1

Materialize (cost=50,647.43..50,738.10 rows=2,790 width=47) (actual time=1,313.202..1,329.191 rows=2,576 loops=1)

85. 8.561 1,327.207 ↑ 1.1 2,576 1

GroupAggregate (cost=50,647.43..50,703.23 rows=2,790 width=47) (actual time=1,313.198..1,327.207 rows=2,576 loops=1)

  • Group Key: assess.chw, 0
86. 32.345 1,318.646 ↓ 6.9 19,237 1

Sort (cost=50,647.43..50,654.40 rows=2,790 width=39) (actual time=1,313.169..1,318.646 rows=19,237 loops=1)

  • Sort Key: assess.chw
  • Sort Method: quicksort Memory: 2271kB
87. 10.852 1,286.301 ↓ 6.9 19,237 1

Nested Loop (cost=6,422.46..50,487.76 rows=2,790 width=39) (actual time=138.983..1,286.301 rows=19,237 loops=1)

88. 33.791 166.199 ↓ 1.5 22,185 1

Bitmap Heap Scan on useview_assessment assess (cost=6,422.03..20,826.07 rows=14,527 width=80) (actual time=135.496..166.199 rows=22,185 loops=1)

  • 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))
  • Heap Blocks: exact=13576
89. 4.940 132.408 ↓ 0.0 0 1

BitmapAnd (cost=6,422.03..6,422.03 rows=14,527 width=0) (actual time=132.408..132.408 rows=0 loops=1)

90. 61.023 61.023 ↓ 1.6 145,242 1

Bitmap Index Scan on useview_assessment_reported_age_uuid (cost=0.00..2,125.51 rows=88,150 width=0) (actual time=61.023..61.023 rows=145,242 loops=1)

  • 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))
91. 66.445 66.445 ↓ 1.0 433,136 1

Bitmap Index Scan on useview_assessment_referral_follow_up (cost=0.00..4,289.01 rows=417,411 width=0) (actual time=66.445..66.445 rows=433,136 loops=1)

  • Index Cond: (referral_follow_up = 'true'::text)
92. 1,109.250 1,109.250 ↑ 1.0 1 22,185

Index Scan using useview_assessment_follow_up_form_source_id on useview_assessment_follow_up follow_up (cost=0.43..2.03 rows=1 width=44) (actual time=0.049..0.050 rows=1 loops=22,185)

  • Index Cond: (form_source_id = assess.uuid)
  • Filter: ((date(date_trunc('day'::text, reported)) - date(date_trunc('day'::text, assess.reported))) <= 2)
  • Rows Removed by Filter: 0
93. 1.027 121.072 ↑ 4.4 472 1

Sort (cost=4,605.94..4,611.13 rows=2,077 width=47) (actual time=120.832..121.072 rows=472 loops=1)

  • Sort Key: communityevent.chw_uuid, communityevent.interval_number
  • Sort Method: quicksort Memory: 86kB
94. 0.068 120.045 ↑ 4.4 472 1

Subquery Scan on communityevent (cost=4,449.95..4,491.50 rows=2,077 width=47) (actual time=119.840..120.045 rows=472 loops=1)

95. 0.891 119.977 ↑ 4.4 472 1

HashAggregate (cost=4,449.95..4,470.73 rows=2,077 width=47) (actual time=119.837..119.977 rows=472 loops=1)

  • Group Key: meta.chw, 0
96. 119.086 119.086 ↑ 3.2 857 1

Index Scan using form_metadata_formname on form_metadata meta (cost=0.56..4,429.61 rows=2,713 width=39) (actual time=0.457..119.086 rows=857 loops=1)

  • 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))
  • Rows Removed by Filter: 56154
97. 84.756 51,645.391 ↑ 1.0 1 5,999

Index Scan using contactview_chp_uuid on contactview_chp chp (cost=0.28..505.01 rows=1 width=40) (actual time=8.609..8.609 rows=1 loops=5,999)

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

SubPlan (for Index Scan)

99. 23.996 43,474.753 ↑ 6.0 1 5,999

Nested Loop Semi Join (cost=0.56..1,816.50 rows=6 width=0) (actual time=7.247..7.247 rows=1 loops=5,999)

  • Join Filter: (meta_1.formname = "*VALUES*_1".column1)
  • Rows Removed by Join Filter: 5
100. 43,450.757 43,450.757 ↑ 39.5 2 5,999

Index Scan using form_metadata_chw on form_metadata meta_1 (cost=0.56..1,812.90 rows=79 width=14) (actual time=6.270..7.243 rows=2 loops=5,999)

  • 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))
  • Rows Removed by Filter: 317
101. 0.000 0.000 ↑ 1.0 3 13,452

Materialize (cost=0.00..0.05 rows=3 width=32) (actual time=0.000..0.000 rows=3 loops=13,452)

102. 0.010 0.010 ↑ 1.0 3 1

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

103. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.60..47,464.40 rows=29,251 width=35) (never executed)

104. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=0.05..0.08 rows=3 width=32) (never executed)

  • Group Key: "*VALUES*_2".column1
105. 0.000 0.000 ↓ 0.0 0

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

106. 0.000 0.000 ↓ 0.0 0

Index Scan using form_metadata_formname on form_metadata meta_2 (cost=0.56..15,723.94 rows=9,750 width=49) (never executed)

  • 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))
107. 806.474 806.474 ↓ 0.0 0 2,234

Index Scan using contactview_metadata_parent_uuid on contactview_metadata clinic (cost=0.56..34.05 rows=1 width=0) (actual time=0.361..0.361 rows=0 loops=2,234)

  • 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))
  • Rows Removed by Filter: 62
108. 0.000 0.000 ↓ 0.0 0

Seq Scan on contactview_metadata clinic_1 (cost=0.00..205,075.32 rows=80,920 width=36) (never executed)

  • 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))
109. 7,279.408 7,279.408 ↓ 0.0 0 2,096

Index Scan using useview_postnatal_reported_chw_patient_id on useview_postnatal_care pnc (cost=0.45..165.44 rows=1 width=0) (actual time=3.473..3.473 rows=0 loops=2,096)

  • 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)
  • Rows Removed by Filter: 0
110. 0.000 0.000 ↓ 0.0 0

Index Scan using useview_postnatal_care_count_reported_uuid on useview_postnatal_care pnc_1 (cost=0.45..2,381.80 rows=2,886 width=35) (never executed)

  • 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))
111. 1,176.023 1,307.782 ↓ 11.8 2,352 5,999

Materialize (cost=435,465.88..435,504.90 rows=200 width=40) (actual time=0.022..0.218 rows=2,352 loops=5,999)

112. 0.467 131.759 ↓ 16.0 3,199 1

Subquery Scan on chp_visits (cost=435,465.88..435,503.90 rows=200 width=40) (actual time=129.596..131.759 rows=3,199 loops=1)

113. 1.118 131.292 ↓ 16.0 3,199 1

Group (cost=435,465.88..435,501.90 rows=200 width=40) (actual time=129.594..131.292 rows=3,199 loops=1)

  • Group Key: ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[])), 0
114. 7.940 130.174 ↑ 1.1 4,123 1

Sort (cost=435,465.88..435,477.72 rows=4,736 width=36) (actual time=129.585..130.174 rows=4,123 loops=1)

  • Sort Key: ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[]))
  • Sort Method: quicksort Memory: 515kB
115. 107.598 122.234 ↑ 1.1 4,123 1

Nested Loop (cost=0.46..435,176.76 rows=4,736 width=36) (actual time=7.947..122.234 rows=4,123 loops=1)

116. 0.005 0.014 ↑ 1.0 2 1

Unique (cost=0.04..0.04 rows=2 width=32) (actual time=0.008..0.014 rows=2 loops=1)

117. 0.006 0.009 ↑ 1.0 2 1

Sort (cost=0.04..0.04 rows=2 width=32) (actual time=0.007..0.009 rows=2 loops=1)

  • Sort Key: "*VALUES*".column1
  • Sort Method: quicksort Memory: 25kB
118. 0.003 0.003 ↑ 1.0 2 1

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

119. 0.572 14.622 ↑ 181.5 2,062 2

Append (cost=0.42..213,839.36 rows=374,308 width=914) (actual time=4.822..7.311 rows=2,062 loops=2)

120. 0.038 0.038 ↓ 0.0 0 2

Index Scan using pat_clinic_expr_idx9 on pat_clinic (cost=0.42..2.98 rows=1 width=559) (actual time=0.018..0.019 rows=0 loops=2)

  • 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))
121. 0.000 0.000 ↓ 0.0 0

Seq Scan on pat_data_record_ancr (cost=0.00..2.11 rows=1 width=32) (never executed)

  • 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))
122. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_ancv_f_cast_isots_idx on pat_data_record_ancv (cost=0.16..2.18 rows=1 width=32) (never executed)

  • 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))
123. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_anc_follow_up (cost=16.60..21.26 rows=3 width=1,430) (never executed)

  • 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))
124. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=16.60..16.60 rows=3 width=0) (never executed)

125. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_anc_follow_up_expr_idx9 (cost=0.00..7.85 rows=591 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_anc_follow_up_f_cast_isots_idx (cost=0.00..8.36 rows=591 width=0) (never executed)

  • 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))
127. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_assessment (cost=331.84..438.97 rows=69 width=18) (never executed)

  • 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))
128. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=331.84..331.84 rows=69 width=0) (never executed)

129. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_assessment_expr_idx9 (cost=0.00..154.40 rows=13,729 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_assessment_f_cast_isots_idx (cost=0.00..173.75 rows=13,729 width=0) (never executed)

  • 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))
131. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_assessment_cbds (cost=4.00..5.55 rows=1 width=18) (never executed)

  • 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))
132. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=4.00..4.00 rows=1 width=0) (never executed)

133. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_assessment_cbds_expr_idx9 (cost=0.00..1.77 rows=65 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_assessment_cbds_f_cast_isots_idx (cost=0.00..1.96 rows=65 width=0) (never executed)

  • 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))
135. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_assessment_follow_up_f_cast_isots_idx on pat_data_record_assessment_follow_up (cost=0.46..89,215.59 rows=116,295 width=1,080) (never executed)

  • 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))
136. 3.508 11.110 ↓ 1,920.0 3,840 1

Bitmap Heap Scan on pat_data_record_chp_visit (cost=11.80..14.91 rows=2 width=18) (actual time=7.676..11.110 rows=3,840 loops=1)

  • 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))
  • Heap Blocks: exact=328
137. 0.032 7.602 ↓ 0.0 0 1

BitmapAnd (cost=11.80..11.80 rows=2 width=0) (actual time=7.602..7.602 rows=0 loops=1)

138. 7.152 7.152 ↓ 199.3 76,530 1

Bitmap Index Scan on pat_data_record_chp_visit_expr_idx9 (cost=0.00..5.30 rows=384 width=0) (actual time=7.152..7.152 rows=76,530 loops=1)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
139. 0.418 0.418 ↓ 10.0 3,840 1

Bitmap Index Scan on pat_data_record_chp_visit_f_cast_isots_idx (cost=0.00..6.16 rows=384 width=0) (actual time=0.418..0.418 rows=3,840 loops=1)

  • 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))
140. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_community_event (cost=9.24..10.79 rows=1 width=872) (never executed)

  • 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))
141. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=9.24..9.24 rows=1 width=0) (never executed)

142. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_community_event_f_cast_isots_idx (cost=0.00..4.28 rows=296 width=0) (never executed)

  • 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))
143. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_community_event_expr_idx9 (cost=0.00..4.63 rows=296 width=0) (never executed)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
144. 0.812 2.680 ↓ 283.0 283 1

Bitmap Heap Scan on pat_data_record_community_events (cost=4.07..5.63 rows=1 width=1,307) (actual time=1.907..2.680 rows=283 loops=1)

  • 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))
  • Heap Blocks: exact=112
145. 0.120 1.868 ↓ 0.0 0 1

BitmapAnd (cost=4.07..4.07 rows=1 width=0) (actual time=1.868..1.868 rows=0 loops=1)

146. 1.708 1.708 ↓ 199.2 13,745 1

Bitmap Index Scan on pat_data_record_community_events_expr_idx9 (cost=0.00..1.80 rows=69 width=0) (actual time=1.708..1.708 rows=13,745 loops=1)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
147. 0.040 0.040 ↓ 4.1 283 1

Bitmap Index Scan on pat_data_record_community_events_f_cast_isots_idx (cost=0.00..2.00 rows=69 width=0) (actual time=0.040..0.040 rows=283 loops=1)

  • 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))
148. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_death_report_f_cast_isots_idx on pat_data_record_death_report (cost=0.17..2.20 rows=1 width=1,133) (never executed)

  • 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))
149. 0.000 0.000 ↓ 0.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.20 rows=1 width=1,069) (never executed)

  • 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))
150. 0.000 0.000 ↓ 0.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.20 rows=1 width=32) (never executed)

  • 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))
151. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_delivery_check_f_cast_isots_idx on pat_data_record_delivery_check (cost=0.45..31,342.77 rows=35,376 width=1,835) (never executed)

  • 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))
152. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_ecd_assessment (cost=3.09..4.64 rows=1 width=18) (never executed)

  • 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))
153. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=3.09..3.09 rows=1 width=0) (never executed)

154. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_ecd_assessment_expr_idx9 (cost=0.00..1.39 rows=14 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_ecd_assessment_f_cast_isots_idx (cost=0.00..1.45 rows=14 width=0) (never executed)

  • 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))
156. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_ecd_follow_up (cost=2.99..4.55 rows=1 width=1,734) (never executed)

  • 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))
157. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=2.99..2.99 rows=1 width=0) (never executed)

158. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_ecd_follow_up_expr_idx9 (cost=0.00..1.34 rows=9 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_ecd_follow_up_f_cast_isots_idx (cost=0.00..1.40 rows=9 width=0) (never executed)

  • 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))
160. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_family_survey_f_cast_isots_idx on pat_data_record_family_survey (cost=0.45..26,418.09 rows=36,500 width=345) (never executed)

  • 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))
161. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_fp_follow_up_long_term_f_cast_isots_idx on pat_data_record_fp_follow_up_long_term (cost=0.31..724.68 rows=1,320 width=1,747) (never executed)

  • 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))
162. 0.000 0.000 ↓ 0.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,572.49 rows=8,386 width=265) (never executed)

  • 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))
163. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_fp_follow_up_refill_f_cast_isots_idx on pat_data_record_fp_follow_up_refill (cost=0.32..323.57 rows=3,306 width=75) (never executed)

  • 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))
164. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_fp_follow_up_short_term_f_cast_isots_idx on pat_data_record_fp_follow_up_short_term (cost=0.32..3,817.08 rows=4,675 width=1,434) (never executed)

  • 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))
165. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_fp_visit_f_cast_isots_idx on pat_data_record_fp_visit (cost=0.32..1,041.70 rows=14,912 width=42) (never executed)

  • 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))
166. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_home_visit_f_cast_isots_idx on pat_data_record_home_visit (cost=0.45..37,165.31 rows=108,964 width=1,283) (never executed)

  • 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))
167. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_household_mute_f_cast_isots_idx on pat_data_record_household_mute (cost=0.30..172.80 rows=584 width=1,794) (never executed)

  • 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 0

Index Scan using pat_data_record_household_mute_task_f_cast_isots_idx on pat_data_record_household_mute_task (cost=0.30..99.91 rows=343 width=1,905) (never executed)

  • 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))
169. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_hub_spoke (cost=3.43..4.98 rows=1 width=1,190) (never executed)

  • 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))
170. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=3.43..3.43 rows=1 width=0) (never executed)

171. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_hub_spoke_expr_idx9 (cost=0.00..1.53 rows=33 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_hub_spoke_f_cast_isots_idx (cost=0.00..1.64 rows=33 width=0) (never executed)

  • 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))
173. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_immunization_follow_up (cost=12.18..15.28 rows=2 width=1,250) (never executed)

  • 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))
174. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=12.18..12.18 rows=2 width=0) (never executed)

175. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_immunization_follow_up_expr_idx9 (cost=0.00..5.46 rows=405 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_immunization_follow_up_f_cast_isots_idx (cost=0.00..6.37 rows=405 width=0) (never executed)

  • 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))
177. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_immunization_ug_f_cast_isots_idx on pat_data_record_immunization_ug (cost=0.32..5,358.89 rows=16,214 width=1,792) (never executed)

  • 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))
178. 0.000 0.000 ↓ 0.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,377.39 rows=4,982 width=1,487) (never executed)

  • 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))
179. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_it_support (cost=3.41..4.96 rows=1 width=1,005) (never executed)

  • 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))
180. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=3.41..3.41 rows=1 width=0) (never executed)

181. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_it_support_expr_idx9 (cost=0.00..1.52 rows=32 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_it_support_f_cast_isots_idx (cost=0.00..1.63 rows=32 width=0) (never executed)

  • 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))
183. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_mini_hub (cost=2.92..4.47 rows=1 width=1,218) (never executed)

  • 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 0

BitmapAnd (cost=2.92..2.92 rows=1 width=0) (never executed)

185. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_mini_hub_expr_idx9 (cost=0.00..1.31 rows=5 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_mini_hub_f_cast_isots_idx (cost=0.00..1.35 rows=5 width=0) (never executed)

  • 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 0

Bitmap Heap Scan on pat_data_record_muac_follow_up (cost=6.98..8.53 rows=1 width=1,358) (never executed)

  • 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 0

BitmapAnd (cost=6.98..6.98 rows=1 width=0) (never executed)

189. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_muac_follow_up_expr_idx9 (cost=0.00..3.10 rows=225 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_muac_follow_up_f_cast_isots_idx (cost=0.00..3.57 rows=225 width=0) (never executed)

  • 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 0

Index Scan using pat_data_record_mute_person_f_cast_isots_idx on pat_data_record_mute_person (cost=0.17..52.23 rows=189 width=1,663) (never executed)

  • 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 0

Index Scan using pat_data_record_muting_approve_request_f_cast_isots_idx on pat_data_record_muting_approve_request (cost=0.30..110.80 rows=749 width=818) (never executed)

  • 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 0

Index Scan using pat_data_record_muting_approved_f_cast_isots_idx on pat_data_record_muting_approved (cost=0.17..2.20 rows=1 width=952) (never executed)

  • 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))
194. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_nutrition_assessment (cost=42.38..54.80 rows=8 width=1,740) (never executed)

  • 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))
195. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=42.38..42.38 rows=8 width=0) (never executed)

196. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_nutrition_assessment_expr_idx9 (cost=0.00..20.36 rows=1,592 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_nutrition_assessment_f_cast_isots_idx (cost=0.00..21.37 rows=1,592 width=0) (never executed)

  • 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))
198. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_ovc_survey_f_cast_isots_idx on pat_data_record_ovc_survey (cost=0.30..36.59 rows=47 width=651) (never executed)

  • 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))
199. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_postnatal_care_f_cast_isots_idx on pat_data_record_postnatal_care (cost=0.45..8,023.72 rows=11,960 width=181) (never executed)

  • 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))
200. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_postnatal_care_cbds (cost=3.14..4.69 rows=1 width=20) (never executed)

  • 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))
201. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=3.14..3.14 rows=1 width=0) (never executed)

202. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_postnatal_care_cbds_expr_idx9 (cost=0.00..1.41 rows=17 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_postnatal_care_cbds_f_cast_isots_idx (cost=0.00..1.48 rows=17 width=0) (never executed)

  • 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))
204. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_pregnancy_f_cast_isots_idx on pat_data_record_pregnancy (cost=0.45..4,291.45 rows=9,353 width=65) (never executed)

  • 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))
205. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_pregnancy_referral_follow_up (cost=11.59..14.70 rows=2 width=898) (never executed)

  • 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))
206. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=11.59..11.59 rows=2 width=0) (never executed)

207. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_pregnancy_referral_follow_up_f_cast_isots_idx (cost=0.00..5.04 rows=372 width=0) (never executed)

  • 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))
208. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_pregnancy_referral_follow_up_expr_idx9 (cost=0.00..6.21 rows=372 width=0) (never executed)

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

Bitmap Heap Scan on pat_data_record_pregnancy_visit (cost=91.80..121.30 rows=19 width=23) (never executed)

  • 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))
210. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=91.80..91.80 rows=19 width=0) (never executed)

211. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_pregnancy_visit_expr_idx9 (cost=0.00..42.59 rows=3,756 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_pregnancy_visit_f_cast_isots_idx (cost=0.00..48.01 rows=3,756 width=0) (never executed)

  • 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))
213. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_prophylaxis_follow_up (cost=13.39..16.49 rows=2 width=1,413) (never executed)

  • 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))
214. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=13.39..13.39 rows=2 width=0) (never executed)

215. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_prophylaxis_follow_up_expr_idx9 (cost=0.00..6.54 rows=417 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_prophylaxis_follow_up_f_cast_isots_idx (cost=0.00..6.49 rows=417 width=0) (never executed)

  • 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))
217. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_symptom_report_f_cast_isots_idx on pat_data_record_symptom_report (cost=0.17..2.20 rows=1 width=18) (never executed)

  • 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))
218. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_u1_follow_up_f_cast_isots_idx on pat_data_record_u1_follow_up (cost=0.32..18.72 rows=17 width=1,113) (never executed)

  • 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))
219. 0.000 0.000 ↓ 0.0 0

Index Scan using pat_data_record_default_f_cast_isots_idx on pat_data_record_default (cost=0.17..2.19 rows=1 width=32) (never executed)

  • 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))
220. 0.020 0.020 ↓ 0.0 0 2

Index Scan using pat_district_hospital_expr_idx9 on pat_district_hospital (cost=0.14..2.69 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=2)

  • 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))
221. 0.024 0.024 ↓ 0.0 0 2

Index Scan using pat_feedback_expr_idx9 on pat_feedback (cost=0.28..2.84 rows=1 width=679) (actual time=0.012..0.012 rows=0 loops=2)

  • 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))
222. 0.018 0.018 ↓ 0.0 0 2

Index Scan using pat_form_expr_idx9 on pat_form (cost=0.14..2.69 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=2)

  • 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))
223. 0.024 0.024 ↓ 0.0 0 2

Index Scan using pat_health_center_expr_idx9 on pat_health_center (cost=0.28..2.84 rows=1 width=682) (actual time=0.012..0.012 rows=0 loops=2)

  • 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))
224. 0.026 0.026 ↓ 0.0 0 2

Index Scan using pat_info_expr_idx9 on pat_info (cost=0.43..2.99 rows=1 width=292) (actual time=0.013..0.013 rows=0 loops=2)

  • 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))
225. 0.016 0.016 ↓ 0.0 0 2

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

  • 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))
  • Rows Removed by Filter: 1
226. 0.030 0.030 ↓ 0.0 0 2

Index Scan using pat_person_expr_idx9 on pat_person (cost=0.43..2.99 rows=1 width=649) (actual time=0.015..0.015 rows=0 loops=2)

  • 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))
227. 0.020 0.020 ↓ 0.0 0 2

Index Scan using pat_traffic_stats_expr_idx9 on pat_traffic_stats (cost=0.28..2.84 rows=1 width=599) (actual time=0.010..0.010 rows=0 loops=2)

  • 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))
228. 0.014 0.014 ↓ 0.0 0 2

Index Scan using pat_usage_stats_expr_idx9 on pat_usage_stats (cost=0.14..2.69 rows=1 width=1,078) (actual time=0.007..0.007 rows=0 loops=2)

  • 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))
229. 0.030 0.030 ↓ 0.0 0 2

Index Scan using couchdb_default_expr_idx9 on couchdb_default (cost=0.42..2.98 rows=1 width=808) (actual time=0.015..0.015 rows=0 loops=2)

  • 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))
230. 1.532 1,492.164 ↑ 1.2 1,598 1

Materialize (cost=4,780.33..5,232.97 rows=1,950 width=47) (actual time=1,450.559..1,492.164 rows=1,598 loops=1)

231. 33.766 1,490.632 ↑ 1.2 1,598 1

GroupAggregate (cost=4,780.33..5,208.59 rows=1,950 width=47) (actual time=1,450.556..1,490.632 rows=1,598 loops=1)

  • Group Key: visit_1.chw, 0
232. 52.742 1,456.866 ↑ 1.0 22,994 1

Sort (cost=4,780.33..4,838.72 rows=23,358 width=81) (actual time=1,450.472..1,456.866 rows=22,994 loops=1)

  • Sort Key: visit_1.chw
  • Sort Method: quicksort Memory: 4071kB
233. 1,404.124 1,404.124 ↑ 1.0 22,994 1

Index Scan using useview_fp_visit_reported_xmlforms_uuid on useview_fp_visit visit_1 (cost=0.45..3,085.51 rows=23,358 width=81) (actual time=0.476..1,404.124 rows=22,994 loops=1)

  • 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))
234. 4.324 5,932.651 ↓ 1.4 11,403 1

Hash (cost=305,207.68..305,207.68 rows=7,934 width=47) (actual time=5,932.651..5,932.651 rows=11,403 loops=1)

  • Buckets: 16384 (originally 8192) Batches: 1 (originally 1) Memory Usage: 1059kB
235. 1.756 5,928.327 ↓ 1.4 11,404 1

Subquery Scan on sync (cost=304,969.66..305,207.68 rows=7,934 width=47) (actual time=5,917.696..5,928.327 rows=11,404 loops=1)

236. 3,354.849 5,926.571 ↓ 1.4 11,404 1

HashAggregate (cost=304,969.66..305,128.34 rows=7,934 width=47) (actual time=5,917.694..5,926.571 rows=11,404 loops=1)

  • Group Key: useview_chp_sync.chw_uuid, 0
237. 2,571.722 2,571.722 ↑ 1.0 9,433,066 1

Seq Scan on useview_chp_sync (cost=0.00..234,221.66 rows=9,433,066 width=47) (actual time=0.030..2,571.722 rows=9,433,066 loops=1)

Planning time : 140.441 ms
Execution time : 94,678.381 ms