explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bPSQ

Settings
# exclusive inclusive rows x rows loops node
1. 86.058 34,739.721 ↓ 1,162.4 5,812 1

GroupAggregate (cost=836,837.69..836,842.51 rows=5 width=389) (actual time=34,652.851..34,739.721 rows=5,812 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: 679
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 110.003 ms, Inlining 77.874 ms, Optimization 6701.230 ms, Emission 4702.829 ms, Total 11591.936 ms
2. 36.697 34,653.663 ↓ 415.1 5,812 1

Sort (cost=836,837.69..836,837.72 rows=14 width=553) (actual time=34,652.762..34,653.663 rows=5,812 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: 3647kB
3. 10.703 34,616.966 ↓ 415.1 5,812 1

Hash Left Join (cost=800,962.08..836,837.42 rows=14 width=553) (actual time=22,028.143..34,616.966 rows=5,812 loops=1)

  • Hash Cond: ((chwlist.chw_uuid = sync.chw_uuid) AND (chwlist.interval_number = sync.interval_number))
4. 9.427 30,469.505 ↓ 415.1 5,812 1

Merge Left Join (cost=513,593.72..549,468.95 rows=14 width=549) (actual time=17,891.359..30,469.505 rows=5,812 loops=1)

  • Merge Cond: (chwlist.chw_uuid = visit_1.chw)
  • Join Filter: ((0) = chwlist.interval_number)
5. 1,190.058 30,368.112 ↓ 415.1 5,812 1

Nested Loop Left Join (cost=509,481.97..545,020.69 rows=14 width=541) (actual time=17,827.631..30,368.112 rows=5,812 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: 12811158
6. 14.240 28,120.270 ↓ 415.1 5,812 1

Nested Loop Left Join (cost=502,607.85..538,085.92 rows=14 width=573) (actual time=17,650.843..28,120.270 rows=5,812 loops=1)

  • Join Filter: (chwlist.interval_number = 0)
7. 5.033 18,835.890 ↓ 415.1 5,812 1

Merge Left Join (cost=502,607.57..530,101.01 rows=14 width=569) (actual time=17,650.559..18,835.890 rows=5,812 loops=1)

  • Merge Cond: ((chwlist.chw_uuid = communityevent.chw_uuid) AND (chwlist.interval_number = communityevent.interval_number))
8. 7.269 18,771.884 ↓ 415.1 5,812 1

Merge Left Join (cost=498,238.49..525,716.59 rows=14 width=561) (actual time=17,591.815..18,771.884 rows=5,812 loops=1)

  • Merge Cond: (chwlist.chw_uuid = assess.chw)
  • Join Filter: (chwlist.interval_number = (0))
9. 9.894 18,074.208 ↓ 415.1 5,812 1

Merge Left Join (cost=446,672.41..474,058.96 rows=14 width=553) (actual time=16,912.229..18,074.208 rows=5,812 loops=1)

  • Merge Cond: (chwlist.chw_uuid = useview_assessment.chw)
  • Join Filter: (chwlist.interval_number = (0))
10. 10.668 16,231.754 ↓ 415.1 5,812 1

Merge Left Join (cost=374,167.86..374,169.48 rows=14 width=337) (actual time=16,217.601..16,231.754 rows=5,812 loops=1)

  • Merge Cond: ((chwlist.chw_uuid = eddnopnc.chw_uuid) AND (chwlist.interval_number = eddnopnc.interval_number))
11. 19.314 14,217.593 ↓ 415.1 5,812 1

Sort (cost=164,871.29..164,871.33 rows=14 width=329) (actual time=14,214.945..14,217.593 rows=5,812 loops=1)

  • Sort Key: chwlist.chw_uuid, chwlist.interval_number
  • Sort Method: quicksort Memory: 2965kB
12. 2.183 14,198.279 ↓ 415.1 5,812 1

Hash Left Join (cost=161,890.17..164,871.03 rows=14 width=329) (actual time=14,190.671..14,198.279 rows=5,812 loops=1)

  • Hash Cond: ((chwlist.chw_uuid = pncvisit.chw_uuid) AND (chwlist.interval_number = pncvisit.interval_number))
13. 3.248 14,170.650 ↓ 415.1 5,812 1

Hash Right Join (cost=158,322.39..161,303.18 rows=14 width=281) (actual time=14,165.196..14,170.650 rows=5,812 loops=1)

  • Hash Cond: ((cmeta.parent_uuid = chwlist.chw_area_uuid) AND ((0) = chwlist.interval_number))
14. 227.025 1,658.047 ↑ 18.0 6,034 1

HashAggregate (cost=93,807.11..94,890.98 rows=108,387 width=56) (actual time=1,655.816..1,658.047 rows=6,034 loops=1)

  • Group Key: cmeta.parent_uuid, 0
15. 430.620 1,431.022 ↑ 1.0 789,688 1

Hash Left Join (cost=52,052.04..85,686.72 rows=812,039 width=76) (actual time=798.812..1,431.022 rows=789,688 loops=1)

  • Hash Cond: (cmeta.uuid = useview_family_survey.family_id)
16. 202.577 202.577 ↑ 1.0 789,688 1

Index Scan using contactview_metadata_type on contactview_metadata cmeta (cost=0.43..31,503.51 rows=812,039 width=72) (actual time=0.037..202.577 rows=789,688 loops=1)

  • Index Cond: (type = 'clinic'::text)
17. 139.900 797.825 ↓ 1.3 466,296 1

Hash (cost=47,445.83..47,445.83 rows=368,462 width=36) (actual time=797.825..797.825 rows=466,296 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 35517kB
18. 379.756 657.925 ↓ 1.3 466,296 1

HashAggregate (cost=40,076.59..43,761.21 rows=368,462 width=36) (actual time=543.024..657.925 rows=466,296 loops=1)

  • Group Key: useview_family_survey.family_id
19. 278.169 278.169 ↓ 1.0 595,432 1

Seq Scan on useview_family_survey (cost=0.00..38,602.05 rows=589,816 width=36) (actual time=0.045..278.169 rows=595,432 loops=1)

  • Filter: is_equity_survey
  • Rows Removed by Filter: 428135
20. 2.926 12,509.355 ↓ 1,162.4 5,812 1

Hash (cost=64,515.21..64,515.21 rows=5 width=229) (actual time=12,509.355..12,509.355 rows=5,812 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1527kB
21. 2.195 12,506.429 ↓ 1,162.4 5,812 1

Hash Right Join (cost=64,014.03..64,515.21 rows=5 width=229) (actual time=12,503.462..12,506.429 rows=5,812 loops=1)

  • Hash Cond: ((contactview_metadata.parent_uuid = chwlist.chw_area_uuid) AND ((0) = chwlist.interval_number))
22. 11.477 887.523 ↑ 6.7 2,731 1

HashAggregate (cost=58,043.95..58,226.19 rows=18,224 width=48) (actual time=886.733..887.523 rows=2,731 loops=1)

  • Group Key: contactview_metadata.parent_uuid, 0
23. 876.046 876.046 ↓ 1.3 26,457 1

Index Scan using contactview_metadata_type on contactview_metadata (cost=0.43..57,894.78 rows=19,890 width=40) (actual time=0.139..876.046 rows=26,457 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: 763231
24. 2.760 11,616.711 ↓ 1,162.4 5,812 1

Hash (cost=5,970.00..5,970.00 rows=5 width=221) (actual time=11,616.711..11,616.711 rows=5,812 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1500kB
25. 2.214 11,613.951 ↓ 1,162.4 5,812 1

Hash Right Join (cost=5,870.52..5,970.00 rows=5 width=221) (actual time=11,611.139..11,613.951 rows=5,812 loops=1)

  • Hash Cond: ((visit.chw = chwlist.chw_uuid) AND ((0) = chwlist.interval_number))
26. 3.661 14.789 ↑ 1.2 2,931 1

HashAggregate (cost=5,572.34..5,608.51 rows=3,617 width=47) (actual time=14.174..14.789 rows=2,931 loops=1)

  • Group Key: visit.chw, 0
27. 7.660 11.128 ↓ 1.3 9,062 1

Bitmap Heap Scan on useview_pregnancy visit (cost=90.63..5,521.65 rows=6,759 width=39) (actual time=3.908..11.128 rows=9,062 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))
  • Heap Blocks: exact=3012
28. 3.468 3.468 ↓ 1.3 9,062 1

Bitmap Index Scan on useview_pregnancy_reported (cost=0.00..88.94 rows=6,759 width=0) (actual time=3.468..3.468 rows=9,062 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))
29. 2.496 11,596.948 ↓ 1,162.4 5,812 1

Hash (cost=298.11..298.11 rows=5 width=213) (actual time=11,596.948..11,596.948 rows=5,812 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1437kB
30. 0.763 11,594.452 ↓ 1,162.4 5,812 1

Subquery Scan on chwlist (cost=256.76..298.11 rows=5 width=213) (actual time=11,592.689..11,594.452 rows=5,812 loops=1)

31. 1.065 11,593.689 ↓ 1,162.4 5,812 1

Hash Join (cost=256.76..298.06 rows=5 width=213) (actual time=11,592.687..11,593.689 rows=5,812 loops=1)

  • Hash Cond: ((row_number() OVER (?)) = (row_number() OVER (?)))
32. 0.008 11,488.800 ↑ 1,000.0 1 1

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

33. 0.018 11,488.792 ↑ 1,000.0 1 1

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

  • Sort Key: generate_series.generate_series
  • Sort Method: quicksort Memory: 25kB
34. 11,488.774 11,488.774 ↑ 1,000.0 1 1

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

35. 3.307 103.824 ↓ 5,812.0 5,812 1

Hash (cost=196.89..196.89 rows=1 width=213) (actual time=103.824..103.824 rows=5,812 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1437kB
36. 1.538 100.517 ↓ 5,812.0 5,812 1

Nested Loop (cost=7.27..196.89 rows=1 width=213) (actual time=0.205..100.517 rows=5,812 loops=1)

37. 3.374 87.355 ↓ 5,812.0 5,812 1

Nested Loop Anti Join (cost=7.20..196.78 rows=1 width=201) (actual time=0.180..87.355 rows=5,812 loops=1)

38. 2.890 62.240 ↓ 7,247.0 7,247 1

Nested Loop (cost=6.92..196.47 rows=1 width=201) (actual time=0.160..62.240 rows=7,247 loops=1)

39. 2.091 8.376 ↓ 7,282.0 7,282 1

Nested Loop (cost=6.37..193.92 rows=1 width=185) (actual time=0.135..8.376 rows=7,282 loops=1)

40. 0.093 0.093 ↓ 24.0 24 1

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

  • Index Cond: (type = 'district_hospital'::text)
  • Filter: (name <> 'HQ'::text)
  • Rows Removed by Filter: 1
41. 4.920 6.192 ↑ 1.0 303 24

Bitmap Heap Scan on contactview_chp chp_1 (cost=5.94..188.23 rows=304 width=166) (actual time=0.069..0.258 rows=303 loops=24)

  • Recheck Cond: (branch_uuid = cmd.uuid)
  • Heap Blocks: exact=3405
42. 1.272 1.272 ↑ 1.0 303 24

Bitmap Index Scan on contactview_chp_branch_uuid (cost=0.00..5.86 rows=304 width=0) (actual time=0.053..0.053 rows=303 loops=24)

  • Index Cond: (branch_uuid = cmd.uuid)
43. 50.974 50.974 ↑ 1.0 1 7,282

Index Scan using contactview_metadata_uuid on contactview_metadata cmeta_1 (cost=0.56..2.55 rows=1 width=52) (actual time=0.007..0.007 rows=1 loops=7,282)

  • Index Cond: (uuid = chp_1.supervisor_uuid)
44. 21.741 21.741 ↓ 0.0 0 7,247

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

  • Index Cond: (chw = chp_1.uuid)
  • Heap Fetches: 0
45. 11.624 11.624 ↑ 1.0 1 5,812

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

46. 0.000 0.000 ↑ 1.0 1 5,812

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

  • Sort Key: generate_series_1.generate_series
  • Sort Method: quicksort Memory: 25kB
47. 0.015 0.015 ↑ 1.0 1 1

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

48. 0.899 25.446 ↓ 1.0 2,510 1

Hash (cost=3,531.33..3,531.33 rows=2,430 width=87) (actual time=25.446..25.446 rows=2,510 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 335kB
49. 0.329 24.547 ↓ 1.0 2,510 1

Subquery Scan on pncvisit (cost=3,482.73..3,531.33 rows=2,430 width=87) (actual time=23.432..24.547 rows=2,510 loops=1)

50. 15.422 24.218 ↓ 1.0 2,510 1

HashAggregate (cost=3,482.73..3,507.03 rows=2,430 width=87) (actual time=23.430..24.218 rows=2,510 loops=1)

  • Group Key: useview_postnatal_care.chw, 0
51. 8.796 8.796 ↓ 1.5 5,399 1

Index Scan using useview_postnatal_care_count_reported_uuid on useview_postnatal_care (cost=0.45..3,192.17 rows=3,632 width=61) (actual time=0.547..8.796 rows=5,399 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))
52. 4.085 2,003.493 ↓ 8.8 1,755 1

Sort (cost=209,296.57..209,297.07 rows=200 width=47) (actual time=2,002.621..2,003.493 rows=1,755 loops=1)

  • Sort Key: eddnopnc.chw_uuid, eddnopnc.interval_number
  • Sort Method: quicksort Memory: 278kB
53. 0.209 1,999.408 ↓ 8.8 1,755 1

Subquery Scan on eddnopnc (cost=209,284.92..209,288.92 rows=200 width=47) (actual time=1,998.778..1,999.408 rows=1,755 loops=1)

54. 1.840 1,999.199 ↓ 8.8 1,755 1

HashAggregate (cost=209,284.92..209,286.92 rows=200 width=47) (actual time=1,998.776..1,999.199 rows=1,755 loops=1)

  • Group Key: p.chw, 0
55. 4.037 1,997.359 ↑ 422.9 2,876 1

Hash Left Join (cost=197,427.26..200,163.84 rows=1,216,145 width=39) (actual time=1,908.882..1,997.359 rows=2,876 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: 3312
56. 119.034 1,686.050 ↑ 1.1 6,188 1

HashAggregate (cost=176,344.35..178,996.01 rows=6,671 width=75) (actual time=1,601.245..1,686.050 rows=6,188 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: 46902
57. 29.910 1,567.016 ↓ 1.5 60,806 1

Merge Anti Join (cost=174,943.00..175,543.85 rows=40,025 width=79) (actual time=1,522.125..1,567.016 rows=60,806 loops=1)

  • Merge Cond: (p.patient_id = useview_pregnancy_visit_1.patient_id)
58. 220.847 1,222.413 ↓ 1.7 76,671 1

Sort (cost=89,051.33..89,161.13 rows=43,918 width=79) (actual time=1,208.549..1,222.413 rows=76,671 loops=1)

  • Sort Key: p.patient_id
  • Sort Method: quicksort Memory: 13854kB
59. 115.792 1,001.566 ↓ 1.7 76,671 1

Hash Join (cost=71,960.68..85,664.70 rows=43,918 width=79) (actual time=813.081..1,001.566 rows=76,671 loops=1)

  • Hash Cond: (p.patient_id = pv.patient_id)
  • Join Filter: (p.reported < pv.reported)
  • Rows Removed by Join Filter: 654
60. 73.015 73.015 ↑ 1.0 322,254 1

Seq Scan on useview_pregnancy p (cost=0.00..12,857.78 rows=322,378 width=83) (actual time=0.011..73.015 rows=322,254 loops=1)

61. 18.970 812.759 ↑ 1.6 66,321 1

Hash (cost=70,645.45..70,645.45 rows=105,218 width=48) (actual time=812.759..812.759 rows=66,321 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 6662kB
62. 9.169 793.789 ↑ 1.6 66,321 1

Subquery Scan on pv (cost=68,780.36..70,645.45 rows=105,218 width=48) (actual time=731.099..793.789 rows=66,321 loops=1)

63. 25.756 784.620 ↑ 1.6 66,321 1

Unique (cost=68,780.36..69,593.27 rows=105,218 width=80) (actual time=731.085..784.620 rows=66,321 loops=1)

64. 531.068 758.864 ↓ 1.0 164,899 1

Sort (cost=68,780.36..69,186.82 rows=162,583 width=80) (actual time=731.083..758.864 rows=164,899 loops=1)

  • Sort Key: useview_pregnancy_visit.patient_id, useview_pregnancy_visit.reported DESC
  • Sort Method: quicksort Memory: 29333kB
65. 200.759 227.796 ↓ 1.0 164,899 1

Bitmap Heap Scan on useview_pregnancy_visit (cost=5,691.32..54,708.14 rows=162,583 width=80) (actual time=30.946..227.796 rows=164,899 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=22497
66. 0.002 27.037 ↓ 0.0 0 1

BitmapOr (cost=5,691.32..5,691.32 rows=337,515 width=0) (actual time=27.037..27.037 rows=0 loops=1)

67. 15.757 15.757 ↓ 1.0 177,045 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,907.43 rows=174,932 width=0) (actual time=15.757..15.757 rows=177,045 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))
68. 11.278 11.278 ↓ 1.0 164,919 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,702.61 rows=162,583 width=0) (actual time=11.278..11.278 rows=164,919 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))
69. 51.720 314.693 ↑ 1.6 14,343 1

Sort (cost=85,891.67..85,948.72 rows=22,822 width=44) (actual time=313.547..314.693 rows=14,343 loops=1)

  • Sort Key: useview_pregnancy_visit_1.patient_id, useview_pregnancy_visit_1.reported DESC
  • Sort Method: quicksort Memory: 1505kB
70. 1.429 262.973 ↑ 1.6 14,343 1

Append (cost=56,228.69..84,239.57 rows=22,822 width=44) (actual time=144.668..262.973 rows=14,343 loops=1)

71. 3.181 149.298 ↑ 1.5 14,329 1

Unique (cost=56,228.69..56,338.95 rows=20,789 width=44) (actual time=144.667..149.298 rows=14,329 loops=1)

72. 30.406 146.117 ↑ 1.5 14,881 1

Sort (cost=56,228.69..56,283.82 rows=22,051 width=44) (actual time=144.666..146.117 rows=14,881 loops=1)

  • Sort Key: useview_pregnancy_visit_1.patient_id
  • Sort Method: quicksort Memory: 1547kB
73. 92.678 115.711 ↑ 1.5 14,881 1

Bitmap Heap Scan on useview_pregnancy_visit useview_pregnancy_visit_1 (cost=5,621.06..54,637.87 rows=22,051 width=44) (actual time=26.965..115.711 rows=14,881 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: 162144
  • Heap Blocks: exact=22497
74. 0.002 23.033 ↓ 0.0 0 1

BitmapOr (cost=5,621.06..5,621.06 rows=337,515 width=0) (actual time=23.033..23.033 rows=0 loops=1)

75. 12.767 12.767 ↓ 1.0 177,045 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,907.43 rows=174,932 width=0) (actual time=12.767..12.767 rows=177,045 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 mon'::interval) - '9 mons'::interval))
76. 10.264 10.264 ↓ 1.0 164,919 1

Bitmap Index Scan on useview_pregnancy_visit_reported_chw (cost=0.00..2,702.61 rows=162,583 width=0) (actual time=10.264..10.264 rows=164,919 loops=1)

  • Index Cond: (reported > ((date_trunc('month'::text, now()) - '1 day'::interval) - '9 mons'::interval))
77. 0.017 112.246 ↑ 145.2 14 1

Unique (cost=27,547.97..27,558.29 rows=2,033 width=44) (actual time=112.229..112.246 rows=14 loops=1)

78. 0.031 112.229 ↑ 147.4 14 1

Sort (cost=27,547.97..27,553.13 rows=2,064 width=44) (actual time=112.228..112.229 rows=14 loops=1)

  • Sort Key: useview_delivery_check.patient_id
  • Sort Method: quicksort Memory: 26kB
79. 112.198 112.198 ↑ 147.4 14 1

Seq Scan on useview_delivery_check (cost=0.00..27,434.34 rows=2,064 width=44) (actual time=1.118..112.198 rows=14 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: 411219
80. 52.045 307.272 ↓ 1.4 148,680 1

Hash (cost=19,729.17..19,729.17 rows=108,299 width=44) (actual time=307.272..307.272 rows=148,680 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 13664kB
81. 96.899 255.227 ↓ 1.4 148,680 1

GroupAggregate (cost=0.42..18,646.18 rows=108,299 width=44) (actual time=0.401..255.227 rows=148,680 loops=1)

  • Group Key: useview_postnatal_care_1.patient_id
82. 158.328 158.328 ↓ 1.0 169,277 1

Index Scan using useview_postnatal_follow_up_count_patient_id on useview_postnatal_care useview_postnatal_care_1 (cost=0.42..16,717.06 rows=169,226 width=44) (actual time=0.053..158.328 rows=169,277 loops=1)

  • Index Cond: (follow_up_count = '1'::text)
83. 5.841 1,832.560 ↑ 1.3 3,623 1

Materialize (cost=72,504.55..99,873.59 rows=4,698 width=255) (actual time=694.617..1,832.560 rows=3,623 loops=1)

84. 1,096.656 1,826.719 ↑ 1.3 3,623 1

GroupAggregate (cost=72,504.55..99,814.87 rows=4,698 width=279) (actual time=694.612..1,826.719 rows=3,623 loops=1)

  • Group Key: useview_assessment.chw, 0
85. 362.097 730.063 ↓ 1.5 145,924 1

Sort (cost=72,504.55..72,741.62 rows=94,829 width=127) (actual time=694.368..730.063 rows=145,924 loops=1)

  • Sort Key: useview_assessment.chw
  • Sort Method: quicksort Memory: 44906kB
86. 367.966 367.966 ↓ 1.5 145,924 1

Index Scan using useview_assessment_reported on useview_assessment (cost=0.46..64,665.49 rows=94,829 width=127) (actual time=0.747..367.966 rows=145,924 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))
87. 1.117 690.407 ↑ 1.0 2,458 1

Materialize (cost=51,566.08..51,648.98 rows=2,551 width=47) (actual time=679.577..690.407 rows=2,458 loops=1)

88. 5.096 689.290 ↑ 1.0 2,458 1

GroupAggregate (cost=51,566.08..51,617.10 rows=2,551 width=47) (actual time=679.574..689.290 rows=2,458 loops=1)

  • Group Key: assess.chw, 0
89. 30.096 684.194 ↓ 7.0 17,819 1

Sort (cost=51,566.08..51,572.45 rows=2,551 width=39) (actual time=679.545..684.194 rows=17,819 loops=1)

  • Sort Key: assess.chw
  • Sort Method: quicksort Memory: 2161kB
90. 17.177 654.098 ↓ 7.0 17,819 1

Nested Loop (cost=6,398.32..51,421.73 rows=2,551 width=39) (actual time=115.311..654.098 rows=17,819 loops=1)

91. 31.040 143.793 ↓ 1.4 20,547 1

Bitmap Heap Scan on useview_assessment assess (cost=6,397.90..21,594.67 rows=14,458 width=80) (actual time=115.204..143.793 rows=20,547 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=12384
92. 4.177 112.753 ↓ 0.0 0 1

BitmapAnd (cost=6,397.90..6,397.90 rows=14,458 width=0) (actual time=112.753..112.753 rows=0 loops=1)

93. 50.321 50.321 ↓ 1.5 135,769 1

Bitmap Index Scan on useview_assessment_reported_age_uuid (cost=0.00..2,181.32 rows=87,730 width=0) (actual time=50.321..50.321 rows=135,769 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))
94. 58.255 58.255 ↓ 1.0 408,737 1

Bitmap Index Scan on useview_assessment_referral_follow_up (cost=0.00..4,209.10 rows=399,969 width=0) (actual time=58.255..58.255 rows=408,737 loops=1)

  • Index Cond: (referral_follow_up = 'true'::text)
95. 493.128 493.128 ↑ 1.0 1 20,547

Index Scan using useview_assessment_follow_up_form_source_id on useview_assessment_follow_up follow_up (cost=0.43..2.05 rows=1 width=44) (actual time=0.024..0.024 rows=1 loops=20,547)

  • 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
96. 0.897 58.973 ↑ 4.6 442 1

Sort (cost=4,369.08..4,374.17 rows=2,034 width=47) (actual time=58.732..58.973 rows=442 loops=1)

  • Sort Key: communityevent.chw_uuid, communityevent.interval_number
  • Sort Method: quicksort Memory: 82kB
97. 0.056 58.076 ↑ 4.6 442 1

Subquery Scan on communityevent (cost=4,216.63..4,257.31 rows=2,034 width=47) (actual time=57.915..58.076 rows=442 loops=1)

98. 0.541 58.020 ↑ 4.6 442 1

HashAggregate (cost=4,216.63..4,236.97 rows=2,034 width=47) (actual time=57.912..58.020 rows=442 loops=1)

  • Group Key: meta.chw, 0
99. 57.479 57.479 ↑ 3.3 796 1

Index Scan using form_metadata_formname on form_metadata meta (cost=0.56..4,196.86 rows=2,637 width=39) (actual time=0.534..57.479 rows=796 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: 55699
100. 58.696 9,270.140 ↑ 1.0 1 5,812

Index Scan using contactview_chp_uuid on contactview_chp chp (cost=0.28..570.34 rows=1 width=40) (actual time=1.595..1.595 rows=1 loops=5,812)

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

SubPlan (for Index Scan)

102. 11.624 4,126.520 ↑ 6.0 1 5,812

Nested Loop Semi Join (cost=0.56..1,876.39 rows=6 width=0) (actual time=0.710..0.710 rows=1 loops=5,812)

  • Join Filter: (meta_1.formname = "*VALUES*_1".column1)
  • Rows Removed by Join Filter: 5
103. 4,114.896 4,114.896 ↑ 38.0 2 5,812

Index Scan using form_metadata_chw on form_metadata meta_1 (cost=0.56..1,872.93 rows=76 width=14) (actual time=0.599..0.708 rows=2 loops=5,812)

  • 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: 326
104. 0.000 0.000 ↑ 1.0 3 12,192

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

105. 0.008 0.008 ↑ 1.0 3 1

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

106. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.60..46,151.87 rows=28,437 width=35) (never executed)

107. 0.000 0.000 ↓ 0.0 0

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

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

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

109. 0.000 0.000 ↓ 0.0 0

Index Scan using form_metadata_formname on form_metadata meta_2 (cost=0.56..15,289.14 rows=9,479 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))
110. 323.479 323.479 ↓ 0.0 0 2,171

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

  • 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: 69
111. 0.000 0.000 ↓ 0.0 0

Seq Scan on contactview_metadata clinic_1 (cost=0.00..194,534.13 rows=78,410 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))
112. 4,761.445 4,761.445 ↓ 0.0 0 2,015

Index Scan using useview_postnatal_reported_chw_patient_id on useview_postnatal_care pnc (cost=0.45..218.49 rows=1 width=0) (actual time=2.363..2.363 rows=0 loops=2,015)

  • 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
113. 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..3,192.17 rows=3,632 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))
114. 880.439 1,057.784 ↓ 11.0 2,205 5,812

Materialize (cost=6,874.11..6,886.27 rows=200 width=40) (actual time=0.030..0.182 rows=2,205 loops=5,812)

115. 0.354 177.345 ↓ 14.7 2,946 1

Subquery Scan on chp_visits (cost=6,874.11..6,885.27 rows=200 width=40) (actual time=175.755..177.345 rows=2,946 loops=1)

116. 0.845 176.991 ↓ 14.7 2,946 1

Group (cost=6,874.11..6,883.27 rows=200 width=40) (actual time=175.753..176.991 rows=2,946 loops=1)

  • Group Key: ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[])), 0
117. 7.950 176.146 ↓ 3.3 3,782 1

Sort (cost=6,874.11..6,877.00 rows=1,154 width=36) (actual time=175.721..176.146 rows=3,782 loops=1)

  • Sort Key: ((pat_clinic.doc #>> '{fields,inputs,contact,_id}'::text[]))
  • Sort Method: quicksort Memory: 392kB
118. 153.972 168.196 ↓ 3.3 3,782 1

Nested Loop (cost=0.46..6,815.42 rows=1,154 width=36) (actual time=6.736..168.196 rows=3,782 loops=1)

119. 0.004 0.010 ↑ 1.0 2 1

Unique (cost=0.04..0.04 rows=2 width=32) (actual time=0.006..0.010 rows=2 loops=1)

120. 0.004 0.006 ↑ 1.0 2 1

Sort (cost=0.04..0.04 rows=2 width=32) (actual time=0.005..0.006 rows=2 loops=1)

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

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

122. 0.579 14.214 ↑ 1.2 1,891 2

Append (cost=0.42..3,383.95 rows=2,229 width=445) (actual time=4.135..7.107 rows=1,891 loops=2)

123. 0.034 0.034 ↓ 0.0 0 2

Index Scan using pat_clinic_expr_idx9 on pat_clinic (cost=0.42..3.18 rows=1 width=551) (actual time=0.017..0.017 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))
124. 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))
125. 0.000 0.000 ↓ 0.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) (never executed)

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

Bitmap Heap Scan on pat_data_record_anc_follow_up (cost=16.39..21.35 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))
127. 0.000 0.000 ↓ 0.0 0

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

128. 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=551 width=0) (never executed)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
129. 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.16 rows=551 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))
130. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_assessment (cost=305.35..405.77 rows=61 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))
131. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=305.35..305.35 rows=61 width=0) (never executed)

132. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_assessment_expr_idx9 (cost=0.00..143.01 rows=12,118 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_assessment_f_cast_isots_idx (cost=0.00..159.04 rows=12,118 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))
134. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_assessment_cbds (cost=4.17..5.82 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))
135. 0.000 0.000 ↓ 0.0 0

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

136. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on pat_data_record_assessment_cbds_f_cast_isots_idx (cost=0.00..2.04 rows=63 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))
138. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_assessment_follow_up (cost=170.63..223.47 rows=32 width=1,060) (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))
139. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=170.63..170.63 rows=32 width=0) (never executed)

140. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_assessment_follow_up_expr_idx9 (cost=0.00..84.00 rows=6,450 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_assessment_follow_up_f_cast_isots_idx (cost=0.00..84.75 rows=6,450 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))
142. 3.146 9.575 ↓ 1,766.5 3,533 1

Bitmap Heap Scan on pat_data_record_chp_visit (cost=11.94..15.23 rows=2 width=18) (actual time=6.493..9.575 rows=3,533 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=321
143. 0.029 6.429 ↓ 0.0 0 1

BitmapAnd (cost=11.94..11.94 rows=2 width=0) (actual time=6.429..6.429 rows=0 loops=1)

144. 5.611 5.611 ↓ 199.8 73,732 1

Bitmap Index Scan on pat_data_record_chp_visit_expr_idx9 (cost=0.00..5.39 rows=369 width=0) (actual time=5.611..5.611 rows=73,732 loops=1)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
145. 0.789 0.789 ↓ 9.6 3,533 1

Bitmap Index Scan on pat_data_record_chp_visit_f_cast_isots_idx (cost=0.00..6.21 rows=369 width=0) (actual time=0.789..0.789 rows=3,533 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))
146. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_community_event (cost=9.32..10.98 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))
147. 0.000 0.000 ↓ 0.0 0

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

148. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_community_event_f_cast_isots_idx (cost=0.00..4.26 rows=284 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))
149. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
150. 2.266 3.942 ↓ 249.0 249 1

Bitmap Heap Scan on pat_data_record_community_events (cost=4.25..5.91 rows=1 width=1,307) (actual time=1.718..3.942 rows=249 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=100
151. 0.123 1.676 ↓ 0.0 0 1

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

152. 1.518 1.518 ↓ 199.9 13,596 1

Bitmap Index Scan on pat_data_record_community_events_expr_idx9 (cost=0.00..1.90 rows=68 width=0) (actual time=1.518..1.518 rows=13,596 loops=1)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
153. 0.035 0.035 ↓ 3.7 249 1

Bitmap Index Scan on pat_data_record_community_events_f_cast_isots_idx (cost=0.00..2.09 rows=68 width=0) (actual time=0.035..0.035 rows=249 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))
154. 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.40 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))
155. 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.39 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))
156. 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.39 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))
157. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_delivery_check (cost=53.09..69.61 rows=10 width=1,835) (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))
158. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=53.09..53.09 rows=10 width=0) (never executed)

159. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_delivery_check_expr_idx9 (cost=0.00..24.67 rows=2,060 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_delivery_check_f_cast_isots_idx (cost=0.00..27.65 rows=2,060 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))
161. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_ecd_assessment (cost=3.29..4.94 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))
162. 0.000 0.000 ↓ 0.0 0

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

163. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on pat_data_record_ecd_assessment_f_cast_isots_idx (cost=0.00..1.55 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))
165. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_ecd_follow_up (cost=3.17..4.83 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))
166. 0.000 0.000 ↓ 0.0 0

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

167. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
168. 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.49 rows=8 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))
169. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_family_survey (cost=132.09..175.00 rows=26 width=337) (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=132.09..132.09 rows=26 width=0) (never executed)

171. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_family_survey_expr_idx9 (cost=0.00..62.13 rows=5,147 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_family_survey_f_cast_isots_idx (cost=0.00..68.42 rows=5,147 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_fp_follow_up_long_term (cost=3.47..5.12 rows=1 width=1,749) (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=3.47..3.47 rows=1 width=0) (never executed)

175. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_follow_up_long_term_expr_idx9 (cost=0.00..1.56 rows=24 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_fp_follow_up_long_term_f_cast_isots_idx (cost=0.00..1.65 rows=24 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

Bitmap Heap Scan on pat_data_record_fp_follow_up_prospective (cost=7.14..8.79 rows=1 width=242) (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))
178. 0.000 0.000 ↓ 0.0 0

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

179. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_follow_up_prospective_f_cast_isots_idx (cost=0.00..3.03 rows=161 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))
180. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_follow_up_prospective_expr_idx9 (cost=0.00..3.82 rows=161 width=0) (never executed)

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

Bitmap Heap Scan on pat_data_record_fp_follow_up_refill (cost=4.53..6.18 rows=1 width=40) (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))
182. 0.000 0.000 ↓ 0.0 0

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

183. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_follow_up_refill_expr_idx9 (cost=0.00..2.01 rows=83 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_fp_follow_up_refill_f_cast_isots_idx (cost=0.00..2.25 rows=83 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))
185. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_fp_follow_up_short_term (cost=7.83..9.49 rows=1 width=1,389) (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))
186. 0.000 0.000 ↓ 0.0 0

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

187. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_follow_up_short_term_f_cast_isots_idx (cost=0.00..3.42 rows=200 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))
188. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_follow_up_short_term_expr_idx9 (cost=0.00..4.12 rows=200 width=0) (never executed)

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

Bitmap Heap Scan on pat_data_record_fp_visit (cost=10.70..13.99 rows=2 width=20) (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))
190. 0.000 0.000 ↓ 0.0 0

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

191. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_visit_f_cast_isots_idx (cost=0.00..5.03 rows=361 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))
192. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_fp_visit_expr_idx9 (cost=0.00..5.33 rows=361 width=0) (never executed)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
193. 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..1,629.85 rows=1,464 width=1,286) (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

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) (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))
195. 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..103.79 rows=350 width=1,901) (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))
196. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_hub_spoke (cost=3.61..5.26 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))
197. 0.000 0.000 ↓ 0.0 0

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

198. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on pat_data_record_hub_spoke_f_cast_isots_idx (cost=0.00..1.73 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))
200. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_immunization_follow_up (cost=12.20..15.51 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))
201. 0.000 0.000 ↓ 0.0 0

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

202. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_immunization_follow_up_expr_idx9 (cost=0.00..5.50 rows=384 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_immunization_follow_up_f_cast_isots_idx (cost=0.00..6.36 rows=384 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_immunization_ug_f_cast_isots_idx on pat_data_record_immunization_ug (cost=0.32..165.69 rows=147 width=1,790) (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

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..48.66 rows=42 width=1,485) (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))
206. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_it_support (cost=3.59..5.25 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))
207. 0.000 0.000 ↓ 0.0 0

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

208. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on pat_data_record_it_support_f_cast_isots_idx (cost=0.00..1.72 rows=31 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))
210. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_mini_hub (cost=3.12..4.77 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))
211. 0.000 0.000 ↓ 0.0 0

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

212. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on pat_data_record_mini_hub_f_cast_isots_idx (cost=0.00..1.45 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))
214. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_muac_follow_up (cost=6.98..8.63 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))
215. 0.000 0.000 ↓ 0.0 0

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

216. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
217. 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.56 rows=214 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))
218. 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..2.40 rows=1 width=1,588) (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_muting_approve_request_f_cast_isots_idx on pat_data_record_muting_approve_request (cost=0.30..5.90 rows=4 width=842) (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.000 0.000 ↓ 0.0 0

Seq Scan on pat_data_record_muting_approved (cost=0.00..1.55 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))
221. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_nutrition_assessment (cost=41.78..53.34 rows=7 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))
222. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=41.78..41.78 rows=7 width=0) (never executed)

223. 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,485 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_nutrition_assessment_f_cast_isots_idx (cost=0.00..20.80 rows=1,485 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))
225. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_ovc_survey (cost=3.17..4.83 rows=1 width=623) (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))
226. 0.000 0.000 ↓ 0.0 0

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

227. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_ovc_survey_expr_idx9 (cost=0.00..1.44 rows=8 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_ovc_survey_f_cast_isots_idx (cost=0.00..1.49 rows=8 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))
229. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_postnatal_care (cost=47.92..62.77 rows=9 width=170) (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))
230. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=47.92..47.92 rows=9 width=0) (never executed)

231. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_postnatal_care_expr_idx9 (cost=0.00..22.95 rows=1,831 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_postnatal_care_f_cast_isots_idx (cost=0.00..24.26 rows=1,831 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))
233. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_postnatal_care_cbds (cost=3.23..4.89 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))
234. 0.000 0.000 ↓ 0.0 0

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

235. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
236. 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.52 rows=11 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))
237. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_pregnancy (cost=43.47..56.65 rows=8 width=59) (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))
238. 0.000 0.000 ↓ 0.0 0

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

239. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_pregnancy_expr_idx9 (cost=0.00..20.44 rows=1,642 width=0) (never executed)

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

Bitmap Index Scan on pat_data_record_pregnancy_f_cast_isots_idx (cost=0.00..22.37 rows=1,642 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))
241. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_pregnancy_referral_follow_up (cost=11.48..14.78 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))
242. 0.000 0.000 ↓ 0.0 0

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

243. 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..4.85 rows=343 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))
244. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Heap Scan on pat_data_record_pregnancy_visit (cost=83.96..111.95 rows=17 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))
246. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=83.96..83.96 rows=17 width=0) (never executed)

247. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on pat_data_record_pregnancy_visit_f_cast_isots_idx (cost=0.00..43.38 rows=3,303 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))
249. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on pat_data_record_prophylaxis_follow_up (cost=12.31..15.61 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))
250. 0.000 0.000 ↓ 0.0 0

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

251. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
252. 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.42 rows=390 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))
253. 0.000 0.000 ↓ 0.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) (never executed)

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

Bitmap Heap Scan on pat_data_record_u1_follow_up (cost=9.41..11.07 rows=1 width=1,099) (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))
255. 0.000 0.000 ↓ 0.0 0

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

256. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_u1_follow_up_f_cast_isots_idx (cost=0.00..4.31 rows=289 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))
257. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pat_data_record_u1_follow_up_expr_idx9 (cost=0.00..4.78 rows=289 width=0) (never executed)

  • Index Cond: ((doc ->> 'form'::text) = "*VALUES*".column1)
258. 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.39 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))
259. 0.012 0.012 ↓ 0.0 0 2

Index Scan using pat_district_hospital_expr_idx9 on pat_district_hospital (cost=0.14..2.89 rows=1 width=32) (actual time=0.006..0.006 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))
260. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pat_feedback_expr_idx9 on pat_feedback (cost=0.28..3.04 rows=1 width=682) (actual time=0.005..0.005 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))
261. 0.004 0.004 ↓ 0.0 0 2

Index Scan using pat_form_expr_idx9 on pat_form (cost=0.14..2.90 rows=1 width=32) (actual time=0.002..0.002 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))
262. 0.006 0.006 ↓ 0.0 0 2

Index Scan using pat_health_center_expr_idx9 on pat_health_center (cost=0.28..3.04 rows=1 width=678) (actual time=0.003..0.003 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))
263. 0.008 0.008 ↓ 0.0 0 2

Index Scan using pat_info_expr_idx9 on pat_info (cost=0.43..3.19 rows=1 width=293) (actual time=0.004..0.004 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))
264. 0.010 0.010 ↓ 0.0 0 2

Seq Scan on pat_meta (cost=0.00..1.55 rows=1 width=32) (actual time=0.005..0.005 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
265. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pat_person_expr_idx9 on pat_person (cost=0.43..3.19 rows=1 width=638) (actual time=0.005..0.005 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))
266. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pat_traffic_stats_expr_idx9 on pat_traffic_stats (cost=0.28..3.04 rows=1 width=599) (actual time=0.005..0.005 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))
267. 0.004 0.004 ↓ 0.0 0 2

Index Scan using pat_usage_stats_expr_idx9 on pat_usage_stats (cost=0.14..2.90 rows=1 width=1,078) (actual time=0.002..0.002 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))
268. 0.010 0.010 ↓ 0.0 0 2

Index Scan using couchdb_default_expr_idx9 on couchdb_default (cost=0.42..3.18 rows=1 width=808) (actual time=0.005..0.005 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))
269. 1.032 91.966 ↑ 1.1 1,546 1

Materialize (cost=4,111.75..4,442.28 rows=1,762 width=47) (actual time=63.719..91.966 rows=1,546 loops=1)

270. 21.748 90.934 ↑ 1.1 1,546 1

GroupAggregate (cost=4,111.75..4,420.26 rows=1,762 width=47) (actual time=63.715..90.934 rows=1,546 loops=1)

  • Group Key: visit_1.chw, 0
271. 38.658 69.186 ↓ 1.3 21,548 1

Sort (cost=4,111.75..4,153.31 rows=16,622 width=81) (actual time=63.637..69.186 rows=21,548 loops=1)

  • Sort Key: visit_1.chw
  • Sort Method: quicksort Memory: 3863kB
272. 30.528 30.528 ↓ 1.3 21,548 1

Index Scan using useview_fp_visit_reported_xmlforms_uuid on useview_fp_visit visit_1 (cost=0.45..2,946.48 rows=16,622 width=81) (actual time=0.463..30.528 rows=21,548 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))
273. 3.178 4,136.758 ↓ 1.9 11,012 1

Hash (cost=287,280.30..287,280.30 rows=5,871 width=47) (actual time=4,136.758..4,136.758 rows=11,012 loops=1)

  • Buckets: 16384 (originally 8192) Batches: 1 (originally 1) Memory Usage: 1027kB
274. 1.364 4,133.580 ↓ 1.9 11,013 1

Subquery Scan on sync (cost=287,104.17..287,280.30 rows=5,871 width=47) (actual time=4,125.773..4,133.580 rows=11,013 loops=1)

275. 2,437.070 4,132.216 ↓ 1.9 11,013 1

HashAggregate (cost=287,104.17..287,221.59 rows=5,871 width=47) (actual time=4,125.770..4,132.216 rows=11,013 loops=1)

  • Group Key: useview_chp_sync.chw_uuid, 0
276. 1,695.146 1,695.146 ↑ 1.0 9,108,280 1

Seq Scan on useview_chp_sync (cost=0.00..218,787.24 rows=9,108,924 width=47) (actual time=0.035..1,695.146 rows=9,108,280 loops=1)

Planning time : 54.816 ms
Execution time : 34,890.045 ms