explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WHKV

Settings
# exclusive inclusive rows x rows loops node
1. 5.188 43,546.636 ↓ 163.0 163 1

GroupAggregate (cost=2,376,408.88..2,376,408.98 rows=1 width=264) (actual time=43,540.896..43,546.636 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. 1.461 92.145 ↓ 5,597.0 5,597 1

Nested Loop (cost=8.51..353.34 rows=1 width=213) (actual time=0.072..92.145 rows=5,597 loops=1)

4. 3.030 85.087 ↓ 5,597.0 5,597 1

Nested Loop Anti Join (cost=8.51..353.29 rows=1 width=201) (actual time=0.064..85.087 rows=5,597 loops=1)

5. 7.796 59.356 ↓ 7,567.0 7,567 1

Nested Loop (cost=8.23..352.97 rows=1 width=201) (actual time=0.056..59.356 rows=7,567 loops=1)

6. 4.429 5.882 ↓ 7,613.0 7,613 1

Hash Join (cost=7.68..350.58 rows=1 width=185) (actual time=0.041..5.882 rows=7,613 loops=1)

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

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

8. 0.006 0.028 ↑ 3.5 25 1

Hash (cost=6.58..6.58 rows=88 width=52) (actual time=0.028..0.028 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.022 0.022 ↑ 3.5 25 1

Index Scan using contactview_metadata_type on contactview_metadata cmd (cost=0.43..6.58 rows=88 width=52) (actual time=0.012..0.022 rows=25 loops=1)

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

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

  • Index Cond: (uuid = chp.supervisor_uuid)
11. 22.701 22.701 ↓ 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.003..0.003 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.02 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=5,597)

13.          

CTE chw_immunization_pool

14. 2.276 54.717 ↓ 41.8 711 1

GroupAggregate (cost=179.83..180.17 rows=17 width=47) (actual time=51.951..54.717 rows=711 loops=1)

  • Group Key: form.chw, 0
15. 5.092 52.441 ↓ 232.2 3,947 1

Sort (cost=179.83..179.87 rows=17 width=39) (actual time=51.931..52.441 rows=3,947 loops=1)

  • Sort Key: form.chw
  • Sort Method: quicksort Memory: 405kB
16. 47.349 47.349 ↓ 232.2 3,947 1

Index Scan using form_metadata_reported on form_metadata form (cost=0.46..179.48 rows=17 width=39) (actual time=0.104..47.349 rows=3,947 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: (formname = ANY ('{immunization_ug,immunization_ug_follow_up}'::text[]))
  • Rows Removed by Filter: 62405
17.          

CTE chw_pool

18. 22.668 161.811 ↑ 2.7 2,029 1

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

  • Group Key: form_1.chw, 0
19. 85.845 139.143 ↓ 1.8 65,814 1

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

  • Sort Key: form_1.chw
  • Sort Method: quicksort Memory: 8214kB
20. 53.298 53.298 ↓ 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.019..53.298 rows=65,814 loops=1)

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

CTE u2_child_numerator

22. 0.960 68.992 ↓ 324.0 324 1

GroupAggregate (cost=4,398.43..4,398.45 rows=1 width=47) (actual time=67.944..68.992 rows=324 loops=1)

  • Group Key: form_2.chw, 0
23. 1.112 68.032 ↓ 883.0 883 1

Sort (cost=4,398.43..4,398.44 rows=1 width=75) (actual time=67.920..68.032 rows=883 loops=1)

  • Sort Key: form_2.chw
  • Sort Method: quicksort Memory: 149kB
24. 0.968 66.920 ↓ 883.0 883 1

Nested Loop (cost=2,994.24..4,398.42 rows=1 width=75) (actual time=39.560..66.920 rows=883 loops=1)

25. 7.344 58.005 ↓ 883.0 883 1

Hash Join (cost=2,993.68..4,395.84 rows=1 width=73) (actual time=39.534..58.005 rows=883 loops=1)

  • Hash Cond: ((useview_immunization_ug.id = i.id) AND ((max(useview_immunization_ug.reported)) = i.reported))
26. 39.338 47.054 ↓ 1.0 43,194 1

HashAggregate (cost=2,815.19..3,246.62 rows=43,143 width=44) (actual time=35.871..47.054 rows=43,194 loops=1)

  • Group Key: useview_immunization_ug.id
27. 7.716 7.716 ↑ 1.0 50,279 1

Seq Scan on useview_immunization_ug (cost=0.00..2,563.79 rows=50,279 width=44) (actual time=0.007..7.716 rows=50,279 loops=1)

28. 0.310 3.607 ↓ 4.1 898 1

Hash (cost=175.24..175.24 rows=217 width=81) (actual time=3.607..3.607 rows=898 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 111kB
29. 3.297 3.297 ↓ 4.1 898 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i (cost=0.32..175.24 rows=217 width=81) (actual time=0.088..3.297 rows=898 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: ((NOT (defaulter)::boolean) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 2124
30. 7.947 7.947 ↑ 1.0 1 883

Index Scan using form_metadata_uuid on form_metadata form_2 (cost=0.56..2.58 rows=1 width=72) (actual time=0.009..0.009 rows=1 loops=883)

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

CTE u2_children_registered

32. 1,424.624 15,275.600 ↑ 6.8 798 1

GroupAggregate (cost=863,014.47..876,642.08 rows=5,450 width=47) (actual time=8,452.643..15,275.600 rows=798 loops=1)

  • Group Key: form_3.chw, 0
33. 7,241.427 13,850.976 ↓ 2.7 3,657,099 1

Sort (cost=863,014.47..866,407.75 rows=1,357,311 width=75) (actual time=8,449.454..13,850.976 rows=3,657,099 loops=1)

  • Sort Key: form_3.chw
  • Sort Method: external merge Disk: 320240kB
34. 1,925.129 6,609.549 ↓ 2.7 3,657,099 1

Hash Join (cost=453,918.92..690,292.60 rows=1,357,311 width=75) (actual time=4,338.944..6,609.549 rows=3,657,099 loops=1)

  • Hash Cond: (demo.chp_area_uuid = form_3.chw_area)
35. 358.209 358.209 ↓ 2.8 2,074 1

Index Scan using useview_population_demographics_chp_area_reported on useview_population_demographics demo (cost=0.58..113,950.73 rows=751 width=71) (actual time=0.824..358.209 rows=2,074 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: (age_in_months <= 23)
  • Rows Removed by Filter: 7760
36. 2,726.590 4,326.211 ↑ 1.0 8,320,173 1

Hash (cost=252,361.26..252,361.26 rows=8,322,326 width=70) (actual time=4,326.211..4,326.211 rows=8,320,173 loops=1)

  • Buckets: 524288 Batches: 32 Memory Usage: 32591kB
37. 1,599.621 1,599.621 ↑ 1.0 8,320,192 1

Seq Scan on form_metadata form_3 (cost=0.00..252,361.26 rows=8,322,326 width=70) (actual time=0.010..1,599.621 rows=8,320,192 loops=1)

38.          

CTE u5_child_numerator

39. 1.751 79.304 ↓ 417.0 417 1

GroupAggregate (cost=4,398.43..4,398.45 rows=1 width=47) (actual time=77.374..79.304 rows=417 loops=1)

  • Group Key: form_4.chw, 0
40. 2.046 77.553 ↓ 1,853.0 1,853 1

Sort (cost=4,398.43..4,398.44 rows=1 width=75) (actual time=77.354..77.553 rows=1,853 loops=1)

  • Sort Key: form_4.chw
  • Sort Method: quicksort Memory: 309kB
41. 0.104 75.507 ↓ 1,853.0 1,853 1

Nested Loop (cost=2,994.24..4,398.42 rows=1 width=75) (actual time=40.467..75.507 rows=1,853 loops=1)

42. 7.328 58.726 ↓ 1,853.0 1,853 1

Hash Join (cost=2,993.68..4,395.84 rows=1 width=73) (actual time=40.440..58.726 rows=1,853 loops=1)

  • Hash Cond: ((useview_immunization_ug_1.id = i_1.id) AND ((max(useview_immunization_ug_1.reported)) = i_1.reported))
43. 39.464 47.265 ↓ 1.0 43,194 1

HashAggregate (cost=2,815.19..3,246.62 rows=43,143 width=44) (actual time=36.264..47.265 rows=43,194 loops=1)

  • Group Key: useview_immunization_ug_1.id
44. 7.801 7.801 ↑ 1.0 50,279 1

Seq Scan on useview_immunization_ug useview_immunization_ug_1 (cost=0.00..2,563.79 rows=50,279 width=44) (actual time=0.007..7.801 rows=50,279 loops=1)

45. 0.612 4.133 ↓ 8.7 1,879 1

Hash (cost=175.24..175.24 rows=217 width=81) (actual time=4.133..4.133 rows=1,879 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 231kB
46. 3.521 3.521 ↓ 8.7 1,879 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i_1 (cost=0.32..175.24 rows=217 width=81) (actual time=0.080..3.521 rows=1,879 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: ((NOT (defaulter)::boolean) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 1143
47. 16.677 16.677 ↑ 1.0 1 1,853

Index Scan using form_metadata_uuid on form_metadata form_4 (cost=0.56..2.58 rows=1 width=72) (actual time=0.008..0.009 rows=1 loops=1,853)

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

CTE u5_children_registered

49. 2,978.754 25,427.537 ↑ 5.7 948 1

GroupAggregate (cost=1,397,499.23..1,444,906.00 rows=5,450 width=47) (actual time=9,762.742..25,427.537 rows=948 loops=1)

  • Group Key: form_5.chw, 0
50. 15,688.072 22,448.783 ↓ 1.4 6,546,088 1

Sort (cost=1,397,499.23..1,409,337.30 rows=4,735,227 width=75) (actual time=9,758.504..22,448.783 rows=6,546,088 loops=1)

  • Sort Key: form_5.chw
  • Sort Method: external merge Disk: 572688kB
51. 2,467.205 6,760.711 ↓ 1.4 6,546,088 1

Hash Join (cost=453,918.92..752,248.89 rows=4,735,227 width=75) (actual time=3,955.185..6,760.711 rows=6,546,088 loops=1)

  • Hash Cond: (demo_1.chp_area_uuid = form_5.chw_area)
52. 349.105 349.105 ↓ 1.6 4,286 1

Index Scan using useview_population_demographics_chp_area_reported on useview_population_demographics demo_1 (cost=0.58..113,950.73 rows=2,620 width=71) (actual time=0.727..349.105 rows=4,286 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: (age_in_months <= 59)
  • Rows Removed by Filter: 5548
53. 2,488.983 3,944.401 ↑ 1.0 8,320,173 1

Hash (cost=252,361.26..252,361.26 rows=8,322,326 width=70) (actual time=3,944.401..3,944.401 rows=8,320,173 loops=1)

  • Buckets: 524288 Batches: 32 Memory Usage: 32591kB
54. 1,455.418 1,455.418 ↑ 1.0 8,320,192 1

Seq Scan on form_metadata form_5 (cost=0.00..252,361.26 rows=8,322,326 width=70) (actual time=0.010..1,455.418 rows=8,320,192 loops=1)

55.          

CTE u2_defaulters_treated

56. 0.327 56.229 ↓ 146.0 146 1

GroupAggregate (cost=4,279.26..4,279.28 rows=1 width=47) (actual time=55.871..56.229 rows=146 loops=1)

  • Group Key: form_6.chw, 0
57. 0.298 55.902 ↓ 248.0 248 1

Sort (cost=4,279.26..4,279.27 rows=1 width=75) (actual time=55.857..55.902 rows=248 loops=1)

  • Sort Key: form_6.chw
  • Sort Method: quicksort Memory: 59kB
58. 0.233 55.604 ↓ 248.0 248 1

Nested Loop (cost=3,090.78..4,279.25 rows=1 width=75) (actual time=37.414..55.604 rows=248 loops=1)

59. 5.846 53.139 ↓ 248.0 248 1

Hash Join (cost=3,090.22..4,276.67 rows=1 width=73) (actual time=37.390..53.139 rows=248 loops=1)

  • Hash Cond: ((useview_immunization_ug_2.id = i_2.id) AND ((max(useview_immunization_ug_2.reported)) = i_2.reported))
60. 36.042 43.289 ↓ 1.0 43,194 1

HashAggregate (cost=2,815.19..3,246.62 rows=43,143 width=44) (actual time=33.359..43.289 rows=43,194 loops=1)

  • Group Key: useview_immunization_ug_2.id
61. 7.247 7.247 ↑ 1.0 50,279 1

Seq Scan on useview_immunization_ug useview_immunization_ug_2 (cost=0.00..2,563.79 rows=50,279 width=44) (actual time=0.007..7.247 rows=50,279 loops=1)

62. 0.070 4.004 ↓ 41.8 251 1

Hash (cost=274.95..274.95 rows=6 width=117) (actual time=4.004..4.004 rows=251 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
63. 0.144 3.934 ↓ 41.8 251 1

Hash Semi Join (cost=95.99..274.95 rows=6 width=117) (actual time=1.090..3.934 rows=251 loops=1)

  • Hash Cond: (i_2.id = useview_immunization_ug_follow_up.patient_id)
64. 2.814 2.814 ↓ 2.8 599 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i_2 (cost=0.32..178.50 rows=217 width=81) (actual time=0.083..2.814 rows=599 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '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: 2423
65. 0.238 0.976 ↓ 1.4 1,205 1

Hash (cost=85.22..85.22 rows=837 width=36) (actual time=0.976..0.976 rows=1,205 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 98kB
66. 0.738 0.738 ↓ 1.4 1,205 1

Index Scan using useview_immunization_ug_follow_up_reported on useview_immunization_ug_follow_up (cost=0.31..85.22 rows=837 width=36) (actual time=0.064..0.738 rows=1,205 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
67. 2.232 2.232 ↑ 1.0 1 248

Index Scan using form_metadata_uuid on form_metadata form_6 (cost=0.56..2.58 rows=1 width=72) (actual time=0.009..0.009 rows=1 loops=248)

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

CTE u2_defaulters

69. 0.806 64.000 ↓ 305.0 305 1

GroupAggregate (cost=4,401.69..4,401.71 rows=1 width=47) (actual time=63.137..64.000 rows=305 loops=1)

  • Group Key: form_7.chw, 0
70. 0.747 63.194 ↓ 594.0 594 1

Sort (cost=4,401.69..4,401.70 rows=1 width=75) (actual time=63.122..63.194 rows=594 loops=1)

  • Sort Key: form_7.chw
  • Sort Method: quicksort Memory: 108kB
71. 0.174 62.447 ↓ 594.0 594 1

Nested Loop (cost=2,997.50..4,401.68 rows=1 width=75) (actual time=37.441..62.447 rows=594 loops=1)

72. 6.684 56.333 ↓ 594.0 594 1

Hash Join (cost=2,996.94..4,399.10 rows=1 width=73) (actual time=37.417..56.333 rows=594 loops=1)

  • Hash Cond: ((useview_immunization_ug_3.id = i_3.id) AND ((max(useview_immunization_ug_3.reported)) = i_3.reported))
73. 38.956 46.335 ↓ 1.0 43,194 1

HashAggregate (cost=2,815.19..3,246.62 rows=43,143 width=44) (actual time=34.076..46.335 rows=43,194 loops=1)

  • Group Key: useview_immunization_ug_3.id
74. 7.379 7.379 ↑ 1.0 50,279 1

Seq Scan on useview_immunization_ug useview_immunization_ug_3 (cost=0.00..2,563.79 rows=50,279 width=44) (actual time=0.007..7.379 rows=50,279 loops=1)

75. 0.187 3.314 ↓ 2.8 599 1

Hash (cost=178.50..178.50 rows=217 width=81) (actual time=3.314..3.314 rows=599 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 77kB
76. 3.127 3.127 ↓ 2.8 599 1

Index Scan using useview_immunization_ug_reported on useview_immunization_ug i_3 (cost=0.32..178.50 rows=217 width=81) (actual time=0.081..3.127 rows=599 loops=1)

  • Index Cond: ((reported >= (((now())::timestamp without time zone - '6 days'::interval))::timestamp without time zone) AND (reported < ((((now())::timestamp without time zone)::timestamp with time zone + '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: 2423
77. 5.940 5.940 ↑ 1.0 1 594

Index Scan using form_metadata_uuid on form_metadata form_7 (cost=0.56..2.58 rows=1 width=72) (actual time=0.010..0.010 rows=1 loops=594)

  • Index Cond: (uuid = i_3.xmlform_uuid)
78. 10.417 43,541.448 ↓ 5,488.0 5,488 1

Sort (cost=450.28..450.28 rows=1 width=296) (actual time=43,540.845..43,541.448 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
79. 209.775 43,531.031 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.27 rows=1 width=296) (actual time=25,630.615..43,531.031 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = u2_defaulters.chw_uuid) AND (chwlist.interval_number = u2_defaulters.interval_number))
  • Rows Removed by Join Filter: 1673536
80. 99.099 43,107.224 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.23 rows=1 width=228) (actual time=25,567.465..43,107.224 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = u2_defaulters_treated.chw_uuid) AND (chwlist.interval_number = u2_defaulters_treated.interval_number))
  • Rows Removed by Join Filter: 801102
81. 280.792 42,876.413 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.20 rows=1 width=220) (actual time=25,511.584..42,876.413 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = u5_child_numerator.chw_uuid) AND (chwlist.interval_number = u5_child_numerator.interval_number))
  • Rows Removed by Join Filter: 2288080
82. 219.238 42,310.245 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.16 rows=1 width=212) (actual time=25,432.016..42,310.245 rows=5,488 loops=1)

  • Join Filter: ((chwlist.chw_uuid = u2_child_numerator.chw_uuid) AND (chwlist.interval_number = u2_child_numerator.interval_number))
  • Rows Removed by Join Filter: 1777788
83. 479.672 41,860.511 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.13 rows=1 width=204) (actual time=25,362.812..41,860.511 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: 3901259
84. 3.527 40,980.215 ↓ 5,488.0 5,488 1

Hash Right Join (cost=299.65..449.53 rows=1 width=196) (actual time=25,310.842..40,980.215 rows=5,488 loops=1)

  • Hash Cond: ((u5_children_registered.chw_uuid = chwlist.chw_uuid) AND (u5_children_registered.interval_number = chwlist.interval_number))
85. 25,428.605 25,428.605 ↑ 5.7 948 1

CTE Scan on u5_children_registered (cost=0.00..109.00 rows=5,450 width=44) (actual time=9,762.745..25,428.605 rows=948 loops=1)

86. 2.088 15,548.083 ↓ 5,488.0 5,488 1

Hash (cost=299.63..299.63 rows=1 width=188) (actual time=15,548.083..15,548.083 rows=5,488 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1094kB
87. 2.412 15,545.995 ↓ 5,488.0 5,488 1

Hash Right Join (cost=149.75..299.63 rows=1 width=188) (actual time=8,719.813..15,545.995 rows=5,488 loops=1)

  • Hash Cond: ((u2_children_registered.chw_uuid = chwlist.chw_uuid) AND (u2_children_registered.interval_number = chwlist.interval_number))
88. 15,276.429 15,276.429 ↑ 6.8 798 1

CTE Scan on u2_children_registered (cost=0.00..109.00 rows=5,450 width=44) (actual time=8,452.646..15,276.429 rows=798 loops=1)

89. 1.902 267.154 ↓ 5,488.0 5,488 1

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

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1046kB
90. 2.387 265.252 ↓ 5,488.0 5,488 1

Hash Right Join (cost=0.04..149.73 rows=1 width=180) (actual time=230.025..265.252 rows=5,488 loops=1)

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

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

92. 2.343 100.303 ↓ 5,488.0 5,488 1

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

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

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

  • Filter: ((branch_name <> 'HQ'::text) AND (branch_name <> 'HQ OVC'::text))
  • Rows Removed by Filter: 109
94. 400.624 400.624 ↓ 41.8 711 5,488

CTE Scan on chw_immunization_pool (cost=0.00..0.34 rows=17 width=44) (actual time=0.010..0.073 rows=711 loops=5,488)

95. 230.496 230.496 ↓ 324.0 324 5,488

CTE Scan on u2_child_numerator (cost=0.00..0.02 rows=1 width=44) (actual time=0.012..0.042 rows=324 loops=5,488)

96. 285.376 285.376 ↓ 417.0 417 5,488

CTE Scan on u5_child_numerator (cost=0.00..0.02 rows=1 width=44) (actual time=0.014..0.052 rows=417 loops=5,488)

97. 131.712 131.712 ↓ 146.0 146 5,488

CTE Scan on u2_defaulters_treated (cost=0.00..0.02 rows=1 width=44) (actual time=0.010..0.024 rows=146 loops=5,488)

98. 214.032 214.032 ↓ 305.0 305 5,488

CTE Scan on u2_defaulters (cost=0.00..0.02 rows=1 width=44) (actual time=0.012..0.039 rows=305 loops=5,488)

Planning time : 32.786 ms
Execution time : 43,677.593 ms