explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uslV

Settings
# exclusive inclusive rows x rows loops node
1. 4.855 41,772.083 ↓ 163.0 163 1

GroupAggregate (cost=2,376,408.88..2,376,408.98 rows=1 width=264) (actual time=41,766.636..41,772.083 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. 0.799 85.206 ↓ 5,597.0 5,597 1

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

4. 1.040 78.810 ↓ 5,597.0 5,597 1

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

5. 3.952 55.069 ↓ 7,567.0 7,567 1

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

6. 4.199 5.439 ↓ 7,613.0 7,613 1

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

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

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

8. 0.004 0.030 ↑ 3.5 25 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.026 0.026 ↑ 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.015..0.026 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.371 49.530 ↓ 41.8 711 1

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

  • Group Key: form.chw, 0
15. 4.602 47.159 ↓ 231.9 3,943 1

Sort (cost=179.83..179.87 rows=17 width=39) (actual time=46.605..47.159 rows=3,943 loops=1)

  • Sort Key: form.chw
  • Sort Method: quicksort Memory: 405kB
16. 42.557 42.557 ↓ 231.9 3,943 1

Index Scan using form_metadata_reported on form_metadata form (cost=0.46..179.48 rows=17 width=39) (actual time=0.058..42.557 rows=3,943 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: 62335
17.          

CTE chw_pool

18. 22.805 161.565 ↑ 2.7 2,029 1

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

  • Group Key: form_1.chw, 0
19. 87.225 138.760 ↓ 1.8 65,814 1

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

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

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

CTE u2_child_numerator

22. 0.888 66.453 ↓ 324.0 324 1

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

  • Group Key: form_2.chw, 0
23. 1.019 65.565 ↓ 883.0 883 1

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

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

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

25. 6.732 56.141 ↓ 883.0 883 1

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

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

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

  • Group Key: useview_immunization_ug.id
27. 7.366 7.366 ↑ 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.366 rows=50,279 loops=1)

28. 0.277 3.598 ↓ 4.1 898 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 111kB
29. 3.321 3.321 ↓ 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.079..3.321 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: 2122
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.060 14,505.359 ↑ 6.8 797 1

GroupAggregate (cost=863,014.47..876,642.08 rows=5,450 width=47) (actual time=7,724.136..14,505.359 rows=797 loops=1)

  • Group Key: form_3.chw, 0
33. 7,078.143 13,081.299 ↓ 2.7 3,641,830 1

Sort (cost=863,014.47..866,407.75 rows=1,357,311 width=75) (actual time=7,721.202..13,081.299 rows=3,641,830 loops=1)

  • Sort Key: form_3.chw
  • Sort Method: external merge Disk: 318904kB
34. 1,842.568 6,003.156 ↓ 2.7 3,641,830 1

Hash Join (cost=453,918.92..690,292.60 rows=1,357,311 width=75) (actual time=3,827.494..6,003.156 rows=3,641,830 loops=1)

  • Hash Cond: (demo.chp_area_uuid = form_3.chw_area)
35. 344.110 344.110 ↓ 2.8 2,068 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.704..344.110 rows=2,068 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: 7749
36. 2,428.083 3,816.478 ↑ 1.0 8,320,173 1

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

  • Buckets: 524288 Batches: 32 Memory Usage: 32591kB
37. 1,388.395 1,388.395 ↑ 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.008..1,388.395 rows=8,320,192 loops=1)

38.          

CTE u5_child_numerator

39. 1.697 80.390 ↓ 417.0 417 1

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

  • Group Key: form_4.chw, 0
40. 1.889 78.693 ↓ 1,852.0 1,852 1

Sort (cost=4,398.43..4,398.44 rows=1 width=75) (actual time=78.519..78.693 rows=1,852 loops=1)

  • Sort Key: form_4.chw
  • Sort Method: quicksort Memory: 309kB
41. 1.035 76.804 ↓ 1,852.0 1,852 1

Nested Loop (cost=2,994.24..4,398.42 rows=1 width=75) (actual time=39.382..76.804 rows=1,852 loops=1)

42. 7.728 59.101 ↓ 1,852.0 1,852 1

Hash Join (cost=2,993.68..4,395.84 rows=1 width=73) (actual time=39.358..59.101 rows=1,852 loops=1)

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

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

  • Group Key: useview_immunization_ug_1.id
44. 7.437 7.437 ↑ 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.006..7.437 rows=50,279 loops=1)

45. 0.502 3.678 ↓ 8.7 1,878 1

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

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 231kB
46. 3.176 3.176 ↓ 8.7 1,878 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.065..3.176 rows=1,878 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: 1142
47. 16.668 16.668 ↑ 1.0 1 1,852

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

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

CTE u5_children_registered

49. 2,855.756 24,449.964 ↑ 5.7 948 1

GroupAggregate (cost=1,397,499.23..1,444,906.00 rows=5,450 width=47) (actual time=9,537.709..24,449.964 rows=948 loops=1)

  • Group Key: form_5.chw, 0
50. 14,985.002 21,594.208 ↓ 1.4 6,530,360 1

Sort (cost=1,397,499.23..1,409,337.30 rows=4,735,227 width=75) (actual time=9,534.267..21,594.208 rows=6,530,360 loops=1)

  • Sort Key: form_5.chw
  • Sort Method: external merge Disk: 571296kB
51. 2,411.907 6,609.206 ↓ 1.4 6,530,360 1

Hash Join (cost=453,918.92..752,248.89 rows=4,735,227 width=75) (actual time=3,862.708..6,609.206 rows=6,530,360 loops=1)

  • Hash Cond: (demo_1.chp_area_uuid = form_5.chw_area)
52. 345.461 345.461 ↓ 1.6 4,278 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.730..345.461 rows=4,278 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: 5539
53. 2,446.653 3,851.838 ↑ 1.0 8,320,173 1

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

  • Buckets: 524288 Batches: 32 Memory Usage: 32591kB
54. 1,405.185 1,405.185 ↑ 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,405.185 rows=8,320,192 loops=1)

55.          

CTE u2_defaulters_treated

56. 0.298 59.136 ↓ 146.0 146 1

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

  • Group Key: form_6.chw, 0
57. 0.280 58.838 ↓ 248.0 248 1

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

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

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

59. 5.751 56.076 ↓ 248.0 248 1

Hash Join (cost=3,090.22..4,276.67 rows=1 width=73) (actual time=40.038..56.076 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. 38.686 46.090 ↓ 1.0 43,194 1

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

  • Group Key: useview_immunization_ug_2.id
61. 7.404 7.404 ↑ 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.404 rows=50,279 loops=1)

62. 0.091 4.235 ↓ 41.8 251 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
63. 0.163 4.144 ↓ 41.8 251 1

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

  • Hash Cond: (i_2.id = useview_immunization_ug_follow_up.patient_id)
64. 2.962 2.962 ↓ 2.8 598 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.071..2.962 rows=598 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: 2422
65. 0.261 1.019 ↓ 1.4 1,205 1

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

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 98kB
66. 0.758 0.758 ↓ 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.054..0.758 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.663 65.290 ↓ 305.0 305 1

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

  • Group Key: form_7.chw, 0
70. 0.738 64.627 ↓ 593.0 593 1

Sort (cost=4,401.69..4,401.70 rows=1 width=75) (actual time=64.545..64.627 rows=593 loops=1)

  • Sort Key: form_7.chw
  • Sort Method: quicksort Memory: 108kB
71. 0.385 63.889 ↓ 593.0 593 1

Nested Loop (cost=2,997.50..4,401.68 rows=1 width=75) (actual time=41.161..63.889 rows=593 loops=1)

72. 6.546 58.167 ↓ 593.0 593 1

Hash Join (cost=2,996.94..4,399.10 rows=1 width=73) (actual time=41.136..58.167 rows=593 loops=1)

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

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

  • Group Key: useview_immunization_ug_3.id
74. 7.770 7.770 ↑ 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.006..7.770 rows=50,279 loops=1)

75. 0.163 3.395 ↓ 2.8 598 1

Hash (cost=178.50..178.50 rows=217 width=81) (actual time=3.395..3.395 rows=598 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 77kB
76. 3.232 3.232 ↓ 2.8 598 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.069..3.232 rows=598 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: 2422
77. 5.337 5.337 ↑ 1.0 1 593

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

  • Index Cond: (uuid = i_3.xmlform_uuid)
78. 10.717 41,767.228 ↓ 5,488.0 5,488 1

Sort (cost=450.28..450.28 rows=1 width=296) (actual time=41,766.582..41,767.228 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. 207.539 41,756.511 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.27 rows=1 width=296) (actual time=24,625.345..41,756.511 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.905 41,334.940 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.23 rows=1 width=228) (actual time=24,560.774..41,334.940 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.173 41,103.323 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.20 rows=1 width=220) (actual time=24,501.979..41,103.323 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. 218.896 40,537.774 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.16 rows=1 width=212) (actual time=24,421.352..40,537.774 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. 474.023 40,093.870 ↓ 5,488.0 5,488 1

Nested Loop Left Join (cost=299.65..450.13 rows=1 width=204) (actual time=24,354.737..40,093.870 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.357 39,224.711 ↓ 5,488.0 5,488 1

Hash Right Join (cost=299.65..449.53 rows=1 width=196) (actual time=24,308.100..39,224.711 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. 24,450.980 24,450.980 ↑ 5.7 948 1

CTE Scan on u5_children_registered (cost=0.00..109.00 rows=5,450 width=44) (actual time=9,537.712..24,450.980 rows=948 loops=1)

86. 2.252 14,770.374 ↓ 5,488.0 5,488 1

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

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1094kB
87. 2.452 14,768.122 ↓ 5,488.0 5,488 1

Hash Right Join (cost=149.75..299.63 rows=1 width=188) (actual time=7,983.778..14,768.122 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. 14,506.042 14,506.042 ↑ 6.8 797 1

CTE Scan on u2_children_registered (cost=0.00..109.00 rows=5,450 width=44) (actual time=7,724.139..14,506.042 rows=797 loops=1)

89. 1.936 259.628 ↓ 5,488.0 5,488 1

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

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

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

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

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

92. 2.281 92.923 ↓ 5,488.0 5,488 1

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

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

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

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

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

95. 225.008 225.008 ↓ 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.041 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.011..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 : 34.292 ms
Execution time : 41,907.894 ms