explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e4J9

Settings
# exclusive inclusive rows x rows loops node
1. 8.997 11,258.659 ↓ 163.0 163 1

GroupAggregate (cost=89,646.51..89,646.61 rows=1 width=264) (actual time=11,248.362..11,258.659 rows=163 loops=1)

  • Group Key: chwlist.branch_uuid, chwlist.branch_name, chwlist.supervisor_uuid, chwlist.supervisor_name, 'multiple'::text, 'multiple'::text, 'multiple'::text, (date(chwlist.interval_start)), chwlist.interval_number
2.          

CTE chwlist

3. 5.308 138.363 ↓ 5,597.0 5,597 1

Nested Loop (cost=8.80..353.64 rows=1 width=213) (actual time=0.143..138.363 rows=5,597 loops=1)

4. 7.836 127.458 ↓ 5,597.0 5,597 1

Nested Loop Anti Join (cost=8.80..353.59 rows=1 width=201) (actual time=0.128..127.458 rows=5,597 loops=1)

5. 5.373 89.354 ↓ 7,567.0 7,567 1

Nested Loop (cost=8.52..353.27 rows=1 width=201) (actual time=0.111..89.354 rows=7,567 loops=1)

6. 5.545 7.851 ↓ 7,613.0 7,613 1

Hash Join (cost=7.97..350.87 rows=1 width=185) (actual time=0.084..7.851 rows=7,613 loops=1)

  • Hash Cond: (chp.branch_uuid = cmd.uuid)
7. 2.248 2.248 ↑ 1.0 7,616 1

Seq Scan on contactview_chp chp (cost=0.00..313.74 rows=7,774 width=166) (actual time=0.012..2.248 rows=7,616 loops=1)

8. 0.014 0.058 ↑ 3.8 25 1

Hash (cost=6.79..6.79 rows=94 width=52) (actual time=0.058..0.058 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.044 0.044 ↑ 3.8 25 1

Index Scan using contactview_metadata_type on contactview_metadata cmd (cost=0.43..6.79 rows=94 width=52) (actual time=0.027..0.044 rows=25 loops=1)

  • Index Cond: (type = 'district_hospital'::text)
10. 76.130 76.130 ↑ 1.0 1 7,613

Index Scan using contactview_metadata_uuid on contactview_metadata cmeta (cost=0.56..2.39 rows=1 width=52) (actual time=0.010..0.010 rows=1 loops=7,613)

  • Index Cond: (uuid = chp.supervisor_uuid)
11. 30.268 30.268 ↓ 0.0 0 7,567

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,567)

  • Index Cond: (chw = chp.uuid)
  • Heap Fetches: 195
12. 5.597 5.597 ↑ 1.0 1 5,597

Result (cost=0.00..0.03 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=5,597)

13.          

CTE chw_immunization_pool

14. 18.121 189.972 ↓ 6.0 1,707 1

GroupAggregate (cost=1,604.66..1,610.40 rows=283 width=47) (actual time=165.360..189.972 rows=1,707 loops=1)

  • Group Key: form.chw, 0
15. 62.622 171.851 ↓ 100.8 29,342 1

Sort (cost=1,604.66..1,605.39 rows=291 width=39) (actual time=165.319..171.851 rows=29,342 loops=1)

  • Sort Key: form.chw
  • Sort Method: quicksort Memory: 3061kB
16. 25.327 109.229 ↓ 100.8 29,342 1

Bitmap Heap Scan on form_metadata form (cost=1,290.12..1,592.76 rows=291 width=39) (actual time=85.929..109.229 rows=29,342 loops=1)

  • Recheck Cond: ((formname = ANY ('{immunization_ug,immunization_ug_follow_up}'::text[])) AND (reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Heap Blocks: exact=10075
17. 5.179 83.902 ↓ 0.0 0 1

BitmapAnd (cost=1,290.12..1,290.12 rows=291 width=0) (actual time=83.902..83.902 rows=0 loops=1)

18. 12.119 12.119 ↓ 1.8 65,814 1

Bitmap Index Scan on form_metadata_formname (cost=0.00..424.99 rows=36,016 width=0) (actual time=12.119..12.119 rows=65,814 loops=1)

  • Index Cond: (formname = ANY ('{immunization_ug,immunization_ug_follow_up}'::text[]))
19. 66.604 66.604 ↓ 7.0 467,591 1

Bitmap Index Scan on form_metadata_reported (cost=0.00..864.74 rows=67,228 width=0) (actual time=66.604..66.604 rows=467,591 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
20.          

CTE chw_pool

21. 38.914 280.302 ↑ 2.7 2,029 1

GroupAggregate (cost=35,984.51..36,399.10 rows=5,443 width=47) (actual time=225.209..280.302 rows=2,029 loops=1)

  • Group Key: form_1.chw, 0
22. 147.692 241.388 ↓ 1.8 65,814 1

Sort (cost=35,984.51..36,074.55 rows=36,016 width=39) (actual time=225.128..241.388 rows=65,814 loops=1)

  • Sort Key: form_1.chw
  • Sort Method: quicksort Memory: 8214kB
23. 93.696 93.696 ↓ 1.8 65,814 1

Index Scan using form_metadata_formname on form_metadata form_1 (cost=0.43..33,258.76 rows=36,016 width=39) (actual time=0.042..93.696 rows=65,814 loops=1)

  • Index Cond: (formname = ANY ('{immunization_ug,immunization_ug_follow_up}'::text[]))
24.          

CTE u2_child_numerator

25. 7.950 156.891 ↑ 3.2 1,082 1

GroupAggregate (cost=10,627.52..10,696.06 rows=3,427 width=47) (actual time=148.058..156.891 rows=1,082 loops=1)

  • Group Key: form_2.chw, 0
26. 13.561 148.941 ↓ 1.9 6,414 1

Sort (cost=10,627.52..10,636.08 rows=3,427 width=75) (actual time=148.024..148.941 rows=6,414 loops=1)

  • Sort Key: form_2.chw
  • Sort Method: quicksort Memory: 1094kB
27. 3.167 135.380 ↓ 1.9 6,414 1

Nested Loop (cost=0.87..10,426.30 rows=3,427 width=75) (actual time=0.100..135.380 rows=6,414 loops=1)

28. 36.003 36.003 ↓ 1.9 6,414 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i (cost=0.31..1,666.51 rows=3,427 width=73) (actual time=0.073..36.003 rows=6,414 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Filter: ((NOT (defaulter)::boolean) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 15490
29. 96.210 96.210 ↑ 1.0 1 6,414

Index Scan using form_metadata_uuid on form_metadata form_2 (cost=0.56..2.55 rows=1 width=72) (actual time=0.014..0.015 rows=1 loops=6,414)

  • Index Cond: (uuid = i.xmlform_uuid)
30.          

CTE u2_children_registered

31. 18.562 289.196 ↓ 1,567.0 1,567 1

GroupAggregate (cost=6,458.59..6,458.62 rows=1 width=47) (actual time=267.168..289.196 rows=1,567 loops=1)

  • Group Key: form_metadata.chw, 0
32. 33.866 270.634 ↓ 14,800.0 14,800 1

Sort (cost=6,458.59..6,458.60 rows=1 width=71) (actual time=267.124..270.634 rows=14,800 loops=1)

  • Sort Key: form_metadata.chw
  • Sort Method: quicksort Memory: 2466kB
33. 15.797 236.768 ↓ 14,800.0 14,800 1

Hash Join (cost=5,937.57..6,458.58 rows=1 width=71) (actual time=209.304..236.768 rows=14,800 loops=1)

  • Hash Cond: (useview_immunization_ug_follow_up.xmlform_uuid = form_metadata.uuid)
34. 34.988 96.117 ↓ 1.6 34,378 1

HashAggregate (cost=4,341.18..4,560.55 rows=21,937 width=96) (actual time=84.434..96.117 rows=34,378 loops=1)

  • Group Key: useview_immunization_ug_follow_up.patient_id, useview_immunization_ug_follow_up.patient_age_in_months, useview_immunization_ug_follow_up.xmlform_uuid
35. 4.981 61.129 ↓ 1.6 34,378 1

Append (cost=0.00..4,176.65 rows=21,937 width=96) (actual time=0.027..61.129 rows=34,378 loops=1)

36. 14.194 14.194 ↓ 1.7 8,561 1

Seq Scan on useview_immunization_ug_follow_up (cost=0.00..890.70 rows=5,178 width=75) (actual time=0.026..14.194 rows=8,561 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 6974
37. 41.954 41.954 ↓ 1.5 25,817 1

Seq Scan on useview_immunization_ug (cost=0.00..3,066.58 rows=16,759 width=75) (actual time=0.024..41.954 rows=25,817 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 24462
38. 12.397 124.854 ↓ 100.8 29,342 1

Hash (cost=1,592.76..1,592.76 rows=291 width=72) (actual time=124.854..124.854 rows=29,342 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 3281kB
39. 27.466 112.457 ↓ 100.8 29,342 1

Bitmap Heap Scan on form_metadata (cost=1,290.12..1,592.76 rows=291 width=72) (actual time=87.312..112.457 rows=29,342 loops=1)

  • Recheck Cond: ((formname = ANY ('{immunization_ug_follow_up,immunization_ug}'::text[])) AND (reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Heap Blocks: exact=10075
40. 5.497 84.991 ↓ 0.0 0 1

BitmapAnd (cost=1,290.12..1,290.12 rows=291 width=0) (actual time=84.991..84.991 rows=0 loops=1)

41. 11.962 11.962 ↓ 1.8 65,814 1

Bitmap Index Scan on form_metadata_formname (cost=0.00..424.99 rows=36,016 width=0) (actual time=11.962..11.962 rows=65,814 loops=1)

  • Index Cond: (formname = ANY ('{immunization_ug_follow_up,immunization_ug}'::text[]))
42. 67.532 67.532 ↓ 7.0 467,591 1

Bitmap Index Scan on form_metadata_reported (cost=0.00..864.74 rows=67,228 width=0) (actual time=67.532..67.532 rows=467,591 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
43.          

CTE u5_child_numerator

44. 18.072 271.137 ↑ 2.8 1,235 1

GroupAggregate (cost=10,627.52..10,696.06 rows=3,427 width=47) (actual time=250.919..271.137 rows=1,235 loops=1)

  • Group Key: form_3.chw, 0
45. 27.789 253.065 ↓ 4.0 13,703 1

Sort (cost=10,627.52..10,636.08 rows=3,427 width=75) (actual time=250.854..253.065 rows=13,703 loops=1)

  • Sort Key: form_3.chw
  • Sort Method: quicksort Memory: 2311kB
46. 9.415 225.276 ↓ 4.0 13,703 1

Nested Loop (cost=0.87..10,426.30 rows=3,427 width=75) (actual time=0.109..225.276 rows=13,703 loops=1)

47. 37.722 37.722 ↓ 4.0 13,703 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i_1 (cost=0.31..1,666.51 rows=3,427 width=73) (actual time=0.085..37.722 rows=13,703 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Filter: ((NOT (defaulter)::boolean) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 8201
48. 178.139 178.139 ↑ 1.0 1 13,703

Index Scan using form_metadata_uuid on form_metadata form_3 (cost=0.56..2.55 rows=1 width=72) (actual time=0.013..0.013 rows=1 loops=13,703)

  • Index Cond: (uuid = i_1.xmlform_uuid)
49.          

CTE u5_children_registered

50. 37.063 381.470 ↓ 1,707.0 1,707 1

GroupAggregate (cost=6,458.59..6,458.62 rows=1 width=47) (actual time=338.763..381.470 rows=1,707 loops=1)

  • Group Key: form_metadata_1.chw, 0
51. 65.095 344.407 ↓ 29,336.0 29,336 1

Sort (cost=6,458.59..6,458.60 rows=1 width=71) (actual time=338.685..344.407 rows=29,336 loops=1)

  • Sort Key: form_metadata_1.chw
  • Sort Method: quicksort Memory: 4894kB
52. 28.896 279.312 ↓ 29,336.0 29,336 1

Hash Join (cost=5,937.57..6,458.58 rows=1 width=71) (actual time=226.256..279.312 rows=29,336 loops=1)

  • Hash Cond: (useview_immunization_ug_follow_up_1.xmlform_uuid = form_metadata_1.uuid)
53. 64.986 131.959 ↓ 3.0 65,793 1

HashAggregate (cost=4,341.18..4,560.55 rows=21,937 width=96) (actual time=107.784..131.959 rows=65,793 loops=1)

  • Group Key: useview_immunization_ug_follow_up_1.patient_id, useview_immunization_ug_follow_up_1.patient_age_in_months, useview_immunization_ug_follow_up_1.xmlform_uuid
54. 9.103 66.973 ↓ 3.0 65,793 1

Append (cost=0.00..4,176.65 rows=21,937 width=96) (actual time=0.026..66.973 rows=65,793 loops=1)

55. 14.826 14.826 ↓ 3.0 15,518 1

Seq Scan on useview_immunization_ug_follow_up useview_immunization_ug_follow_up_1 (cost=0.00..890.70 rows=5,178 width=75) (actual time=0.026..14.826 rows=15,518 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 17
56. 43.044 43.044 ↓ 3.0 50,275 1

Seq Scan on useview_immunization_ug useview_immunization_ug_1 (cost=0.00..3,066.58 rows=16,759 width=75) (actual time=0.016..43.044 rows=50,275 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 4
57. 11.526 118.457 ↓ 100.8 29,342 1

Hash (cost=1,592.76..1,592.76 rows=291 width=72) (actual time=118.456..118.457 rows=29,342 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 3281kB
58. 25.649 106.931 ↓ 100.8 29,342 1

Bitmap Heap Scan on form_metadata form_metadata_1 (cost=1,290.12..1,592.76 rows=291 width=72) (actual time=83.377..106.931 rows=29,342 loops=1)

  • Recheck Cond: ((formname = ANY ('{immunization_ug_follow_up,immunization_ug}'::text[])) AND (reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Heap Blocks: exact=10075
59. 4.980 81.282 ↓ 0.0 0 1

BitmapAnd (cost=1,290.12..1,290.12 rows=291 width=0) (actual time=81.282..81.282 rows=0 loops=1)

60. 12.164 12.164 ↓ 1.8 65,814 1

Bitmap Index Scan on form_metadata_formname (cost=0.00..424.99 rows=36,016 width=0) (actual time=12.164..12.164 rows=65,814 loops=1)

  • Index Cond: (formname = ANY ('{immunization_ug_follow_up,immunization_ug}'::text[]))
61. 64.138 64.138 ↓ 7.0 467,591 1

Bitmap Index Scan on form_metadata_reported (cost=0.00..864.74 rows=67,228 width=0) (actual time=64.138..64.138 rows=467,591 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
62.          

CTE u2_defaulters_treated

63. 5.268 133.795 ↑ 1.1 1,024 1

GroupAggregate (cost=5,728.72..5,752.00 rows=1,164 width=47) (actual time=127.962..133.795 rows=1,024 loops=1)

  • Group Key: form_4.chw, 0
64. 8.735 128.527 ↓ 3.2 3,720 1

Sort (cost=5,728.72..5,731.63 rows=1,164 width=75) (actual time=127.939..128.527 rows=3,720 loops=1)

  • Sort Key: form_4.chw
  • Sort Method: quicksort Memory: 620kB
65. 3.535 119.792 ↓ 3.2 3,720 1

Nested Loop (cost=930.41..5,669.45 rows=1,164 width=75) (actual time=12.628..119.792 rows=3,720 loops=1)

66. 3.164 53.017 ↓ 3.2 3,720 1

Hash Semi Join (cost=929.85..2,694.13 rows=1,164 width=73) (actual time=12.565..53.017 rows=3,720 loops=1)

  • Hash Cond: (i_2.id = useview_immunization_ug_follow_up_2.patient_id)
67. 37.654 37.654 ↓ 1.3 4,404 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i_2 (cost=0.31..1,717.92 rows=3,427 width=73) (actual time=0.287..37.654 rows=4,404 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Filter: ((patient_age_in_months <> ''::text) AND (defaulter)::boolean AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 17500
68. 5.125 12.199 ↑ 1.0 15,535 1

Hash (cost=735.35..735.35 rows=15,535 width=36) (actual time=12.199..12.199 rows=15,535 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1175kB
69. 7.074 7.074 ↑ 1.0 15,535 1

Seq Scan on useview_immunization_ug_follow_up useview_immunization_ug_follow_up_2 (cost=0.00..735.35 rows=15,535 width=36) (actual time=0.026..7.074 rows=15,535 loops=1)

70. 63.240 63.240 ↑ 1.0 1 3,720

Index Scan using form_metadata_uuid on form_metadata form_4 (cost=0.56..2.55 rows=1 width=72) (actual time=0.017..0.017 rows=1 loops=3,720)

  • Index Cond: (uuid = i_2.xmlform_uuid)
71.          

CTE u2_defaulters

72. 6.391 115.423 ↑ 2.9 1,175 1

GroupAggregate (cost=10,678.92..10,747.46 rows=3,427 width=47) (actual time=108.156..115.423 rows=1,175 loops=1)

  • Group Key: form_5.chw, 0
73. 10.411 109.032 ↓ 1.3 4,404 1

Sort (cost=10,678.92..10,687.49 rows=3,427 width=75) (actual time=108.137..109.032 rows=4,404 loops=1)

  • Sort Key: form_5.chw
  • Sort Method: quicksort Memory: 812kB
74. 4.656 98.621 ↓ 1.3 4,404 1

Nested Loop (cost=0.87..10,477.71 rows=3,427 width=75) (actual time=0.142..98.621 rows=4,404 loops=1)

75. 36.713 36.713 ↓ 1.3 4,404 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i_3 (cost=0.31..1,717.92 rows=3,427 width=73) (actual time=0.115..36.713 rows=4,404 loops=1)

  • Index Cond: ((reported >= ((((now())::timestamp without time zone - '1 mon'::interval) + '1 day'::interval))::timestamp without time zone) AND (reported < ((now() + '1 day'::interval))::timestamp without time zone))
  • Filter: ((patient_age_in_months <> ''::text) AND (defaulter)::boolean AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 17500
76. 57.252 57.252 ↑ 1.0 1 4,404

Index Scan using form_metadata_uuid on form_metadata form_5 (cost=0.56..2.55 rows=1 width=72) (actual time=0.013..0.013 rows=1 loops=4,404)

  • Index Cond: (uuid = i_3.xmlform_uuid)
77. 17.325 11,249.662 ↓ 5,488.0 5,488 1

Sort (cost=474.56..474.56 rows=1 width=296) (actual time=11,248.291..11,249.662 rows=5,488 loops=1)

  • Sort Key: chwlist.branch_uuid, chwlist.branch_name, chwlist.supervisor_uuid, chwlist.supervisor_name, (date(chwlist.interval_start)), chwlist.interval_number
  • Sort Method: quicksort Memory: 1650kB
78. 4.636 11,232.337 ↓ 5,488.0 5,488 1

Hash Right Join (cost=380.29..474.55 rows=1 width=296) (actual time=11,219.709..11,232.337 rows=5,488 loops=1)

  • Hash Cond: ((u2_defaulters.chw_uuid = chwlist.chw_uuid) AND (u2_defaulters.interval_number = chwlist.interval_number))
79. 116.175 116.175 ↑ 2.9 1,175 1

CTE Scan on u2_defaulters (cost=0.00..68.54 rows=3,427 width=44) (actual time=108.159..116.175 rows=1,175 loops=1)

80. 5.581 11,111.526 ↓ 5,488.0 5,488 1

Hash (cost=380.28..380.28 rows=1 width=228) (actual time=11,111.526..11,111.526 rows=5,488 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1149kB
81. 1,772.052 11,105.945 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=220.61..380.28 rows=1 width=228) (actual time=1,727.921..11,105.945 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = u5_children_registered.chw_uuid) AND (chwlist.interval_number = u5_children_registered.interval_number))
  • Rows Removed by Join Filter: 9366316
82. 1,626.823 7,561.269 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=220.61..380.24 rows=1 width=220) (actual time=1,389.147..7,561.269 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = u2_children_registered.chw_uuid) AND (chwlist.interval_number = u2_children_registered.interval_number))
  • Rows Removed by Join Filter: 8598136
83. 1,772.243 4,370.366 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=220.61..380.21 rows=1 width=212) (actual time=1,121.969..4,370.366 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = chw_immunization_pool.chw_uuid) AND (chwlist.interval_number = chw_immunization_pool.interval_number))
  • Rows Removed by Join Filter: 9366316
84. 4.450 1,017.579 ↓ 5,488.0 5,488 1

Hash Right Join (cost=220.61..370.30 rows=1 width=204) (actual time=956.599..1,017.579 rows=5,488 loops=1)

  • Hash Cond: ((chw_pool.chw_uuid = chwlist.chw_uuid) AND (chw_pool.interval_number = chwlist.interval_number))
85. 281.763 281.763 ↑ 2.7 2,029 1

CTE Scan on chw_pool (cost=0.00..108.86 rows=5,443 width=44) (actual time=225.212..281.763 rows=2,029 loops=1)

86. 3.154 731.366 ↓ 5,488.0 5,488 1

Hash (cost=220.60..220.60 rows=1 width=196) (actual time=731.366..731.366 rows=5,488 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1092kB
87. 2.454 728.212 ↓ 5,488.0 5,488 1

Hash Right Join (cost=126.34..220.60 rows=1 width=196) (actual time=704.779..728.212 rows=5,488 loops=1)

  • Hash Cond: ((u5_child_numerator.chw_uuid = chwlist.chw_uuid) AND (u5_child_numerator.interval_number = chwlist.interval_number))
88. 271.919 271.919 ↑ 2.8 1,235 1

CTE Scan on u5_child_numerator (cost=0.00..68.54 rows=3,427 width=44) (actual time=250.922..271.919 rows=1,235 loops=1)

89. 3.083 453.839 ↓ 5,488.0 5,488 1

Hash (cost=126.33..126.33 rows=1 width=188) (actual time=453.839..453.839 rows=5,488 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1082kB
90. 2.432 450.756 ↓ 5,488.0 5,488 1

Hash Right Join (cost=32.08..126.33 rows=1 width=188) (actual time=438.831..450.756 rows=5,488 loops=1)

  • Hash Cond: ((u2_child_numerator.chw_uuid = chwlist.chw_uuid) AND (u2_child_numerator.interval_number = chwlist.interval_number))
91. 157.575 157.575 ↑ 3.2 1,082 1

CTE Scan on u2_child_numerator (cost=0.00..68.54 rows=3,427 width=44) (actual time=148.061..157.575 rows=1,082 loops=1)

92. 3.010 290.749 ↓ 5,488.0 5,488 1

Hash (cost=32.06..32.06 rows=1 width=180) (actual time=290.749..290.749 rows=5,488 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1032kB
93. 2.326 287.739 ↓ 5,488.0 5,488 1

Hash Right Join (cost=0.04..32.06 rows=1 width=180) (actual time=278.933..287.739 rows=5,488 loops=1)

  • Hash Cond: ((u2_defaulters_treated.chw_uuid = chwlist.chw_uuid) AND (u2_defaulters_treated.interval_number = chwlist.interval_number))
94. 134.463 134.463 ↑ 1.1 1,024 1

CTE Scan on u2_defaulters_treated (cost=0.00..23.28 rows=1,164 width=44) (actual time=127.964..134.463 rows=1,024 loops=1)

95. 3.797 150.950 ↓ 5,488.0 5,488 1

Hash (cost=0.03..0.03 rows=1 width=172) (actual time=150.950..150.950 rows=5,488 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1018kB
96. 147.153 147.153 ↓ 5,488.0 5,488 1

CTE Scan on chwlist (cost=0.00..0.03 rows=1 width=172) (actual time=0.151..147.153 rows=5,488 loops=1)

  • Filter: ((branch_name <> 'HQ'::text) AND (branch_name <> 'HQ OVC'::text))
  • Rows Removed by Filter: 109
97. 1,580.544 1,580.544 ↓ 6.0 1,707 5,488

CTE Scan on chw_immunization_pool (cost=0.00..5.66 rows=283 width=44) (actual time=0.030..0.288 rows=1,707 loops=5,488)

98. 1,564.080 1,564.080 ↓ 1,567.0 1,567 5,488

CTE Scan on u2_children_registered (cost=0.00..0.02 rows=1 width=44) (actual time=0.049..0.285 rows=1,567 loops=5,488)

99. 1,772.624 1,772.624 ↓ 1,707.0 1,707 5,488

CTE Scan on u5_children_registered (cost=0.00..0.02 rows=1 width=44) (actual time=0.062..0.323 rows=1,707 loops=5,488)

Planning time : 36.107 ms
Execution time : 11,263.397 ms