explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3rAo

Settings
# exclusive inclusive rows x rows loops node
1. 39.786 1,088.830 ↓ 79.1 15,813 1

GroupAggregate (cost=80,417.94..80,503.45 rows=200 width=213) (actual time=1,047.431..1,088.830 rows=15,813 loops=1)

  • Group Key: cmd.uuid, cmd.name, chp.supervisor_uuid, cmeta.name, chp.uuid, chp.name, chp.phone, (date((COALESCE(gss.interval_start, (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp with time zone)))), (COALESCE(gsn.interval_number, 0))
2. 113.072 1,049.044 ↓ 9.5 15,813 1

Sort (cost=80,417.94..80,422.10 rows=1,667 width=245) (actual time=1,047.413..1,049.044 rows=15,813 loops=1)

  • Sort Key: cmd.uuid, cmd.name, chp.supervisor_uuid, cmeta.name, chp.uuid, chp.name, chp.phone, (date((COALESCE(gss.interval_start, (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp with time zone)))), (COALESCE(gsn.interval_number, 0))
  • Sort Method: quicksort Memory: 4661kB
3. 8.527 935.972 ↓ 9.5 15,813 1

Hash Left Join (cost=79,187.50..80,328.73 rows=1,667 width=245) (actual time=857.786..935.972 rows=15,813 loops=1)

  • Hash Cond: ((chp.uuid = u2_defaulters.chw_uuid) AND ((COALESCE(gsn.interval_number, 0)) = u2_defaulters.interval_number))
4. 6.701 921.169 ↓ 9.5 15,813 1

Merge Left Join (cost=78,570.35..79,698.65 rows=1,667 width=241) (actual time=851.500..921.169 rows=15,813 loops=1)

  • Merge Cond: (chp.uuid = form_4.chw)
  • Join Filter: ((COALESCE(gsn.interval_number, 0)) = (0))
  • Rows Removed by Join Filter: 4560
5. 8.169 744.104 ↓ 9.5 15,813 1

Merge Left Join (cost=60,022.33..61,142.42 rows=1,667 width=233) (actual time=688.076..744.104 rows=15,813 loops=1)

  • Merge Cond: (chp.uuid = form_3.chw)
  • Join Filter: ((COALESCE(gsn.interval_number, 0)) = (0))
  • Rows Removed by Join Filter: 8616
6. 9.220 590.374 ↓ 9.5 15,813 1

Merge Left Join (cost=40,770.17..40,782.85 rows=1,667 width=225) (actual time=578.050..590.374 rows=15,813 loops=1)

  • Merge Cond: ((chp.uuid = u2_children_registered.chw_uuid) AND ((COALESCE(gsn.interval_number, 0)) = u2_children_registered.interval_number))
7. 39.289 426.216 ↓ 9.5 15,813 1

Sort (cost=22,220.94..22,225.11 rows=1,667 width=217) (actual time=423.160..426.216 rows=15,813 loops=1)

  • Sort Key: chp.uuid, (COALESCE(gsn.interval_number, 0))
  • Sort Method: quicksort Memory: 4585kB
8. 5.104 386.927 ↓ 9.5 15,813 1

Hash Left Join (cost=21,974.60..22,131.73 rows=1,667 width=217) (actual time=349.560..386.927 rows=15,813 loops=1)

  • Hash Cond: ((chp.uuid = u2_child_numerator.chw_uuid) AND ((COALESCE(gsn.interval_number, 0)) = u2_child_numerator.interval_number))
9. 5.096 371.153 ↓ 9.5 15,813 1

Hash Left Join (cost=21,357.44..21,505.82 rows=1,667 width=209) (actual time=338.879..371.153 rows=15,813 loops=1)

  • Hash Cond: ((chp.uuid = u5_child_numerator.chw_uuid) AND ((COALESCE(gsn.interval_number, 0)) = u5_child_numerator.interval_number))
10. 4.392 291.242 ↓ 9.5 15,813 1

Hash Left Join (cost=19,402.81..19,542.44 rows=1,667 width=201) (actual time=264.040..291.242 rows=15,813 loops=1)

  • Hash Cond: ((chp.uuid = u2_defaulters_treated.chw_uuid) AND ((COALESCE(gsn.interval_number, 0)) = u2_defaulters_treated.interval_number))
11. 5.688 261.668 ↓ 9.5 15,813 1

Hash Left Join (cost=17,607.44..17,738.31 rows=1,667 width=193) (actual time=238.849..261.668 rows=15,813 loops=1)

  • Hash Cond: ((chp.uuid = chw_immunization_pool.chw_uuid) AND ((COALESCE(gsn.interval_number, 0)) = chw_immunization_pool.interval_number))
12. 7.422 66.696 ↓ 9.5 15,813 1

Hash Left Join (cost=299.70..405.15 rows=1,667 width=217) (actual time=49.555..66.696 rows=15,813 loops=1)

  • Hash Cond: (chp.uuid = chp_muting.chw)
  • Filter: ((chp_muting.chw IS NULL) OR ((COALESCE(gss.interval_start, (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp with time zone)) < chp_muting.start_on) OR ((COALESCE(gss.interval_start, (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp with time zone)) > chp_muting.end_on))
  • Rows Removed by Filter: 4878
13. 31.008 59.057 ↓ 6.9 20,691 1

HashAggregate (cost=277.83..345.33 rows=3,000 width=233) (actual time=49.323..59.057 rows=20,691 loops=1)

  • Group Key: cmd.uuid, cmd.name, chp.supervisor_uuid, chp.area_uuid, cmeta.name, chp.uuid, chp.name, chp.phone, gss.interval_start, gsn.interval_number
14. 7.718 28.049 ↓ 6.9 20,691 1

Nested Loop Left Join (cost=4.62..202.83 rows=3,000 width=221) (actual time=0.247..28.049 rows=20,691 loops=1)

15. 2.667 20.331 ↓ 6.9 6,897 1

Nested Loop Left Join (cost=4.55..142.75 rows=1,000 width=217) (actual time=0.230..20.331 rows=6,897 loops=1)

16. 1.565 17.664 ↓ 2,299.0 2,299 1

Nested Loop (cost=4.52..122.72 rows=1 width=209) (actual time=0.213..17.664 rows=2,299 loops=1)

17. 1.353 2.305 ↓ 2,299.0 2,299 1

Hash Join (cost=4.09..120.45 rows=1 width=192) (actual time=0.176..2.305 rows=2,299 loops=1)

  • Hash Cond: (chp.branch_uuid = cmd.uuid)
18. 0.822 0.822 ↑ 1.0 2,405 1

Seq Scan on contactview_chp chp (cost=0.00..110.05 rows=2,405 width=172) (actual time=0.027..0.822 rows=2,405 loops=1)

19. 0.010 0.130 ↑ 2.4 13 1

Hash (cost=3.70..3.70 rows=31 width=53) (actual time=0.130..0.130 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.120 0.120 ↑ 2.4 13 1

Index Scan using contactview_metadata_type on contactview_metadata cmd (cost=0.43..3.70 rows=31 width=53) (actual time=0.048..0.120 rows=13 loops=1)

  • Index Cond: (type = 'district_hospital'::text)
  • Filter: ((name <> 'HQ'::text) AND (name <> 'HQ OVC'::text))
  • Rows Removed by Filter: 1
21. 13.794 13.794 ↑ 1.0 1 2,299

Index Scan using contactview_metadata_uuid on contactview_metadata cmeta (cost=0.43..2.27 rows=1 width=53) (actual time=0.006..0.006 rows=1 loops=2,299)

  • Index Cond: (uuid = chp.supervisor_uuid)
22. 0.000 0.000 ↑ 333.3 3 2,299

Function Scan on generate_series gss (cost=0.03..10.03 rows=1,000 width=8) (actual time=0.000..0.000 rows=3 loops=2,299)

23. 0.000 0.000 ↑ 1.0 3 6,897

Function Scan on generate_series gsn (cost=0.07..0.10 rows=3 width=4) (actual time=0.000..0.000 rows=3 loops=6,897)

24. 0.115 0.217 ↑ 1.0 661 1

Hash (cost=13.61..13.61 rows=661 width=45) (actual time=0.216..0.217 rows=661 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 60kB
25. 0.102 0.102 ↑ 1.0 661 1

Seq Scan on chp_muting (cost=0.00..13.61 rows=661 width=45) (actual time=0.020..0.102 rows=661 loops=1)

26. 0.442 189.284 ↑ 1.9 1,353 1

Hash (cost=17,269.23..17,269.23 rows=2,567 width=48) (actual time=189.284..189.284 rows=1,353 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 143kB
27. 0.197 188.842 ↑ 1.9 1,353 1

Subquery Scan on chw_immunization_pool (cost=17,110.50..17,269.23 rows=2,567 width=48) (actual time=176.582..188.842 rows=1,353 loops=1)

28. 9.509 188.645 ↑ 1.9 1,353 1

GroupAggregate (cost=17,110.50..17,243.56 rows=2,567 width=48) (actual time=176.580..188.645 rows=1,353 loops=1)

  • Group Key: form.chw, 0
29. 32.848 179.136 ↓ 2.5 26,394 1

Sort (cost=17,110.50..17,137.35 rows=10,739 width=40) (actual time=176.558..179.136 rows=26,394 loops=1)

  • Sort Key: form.chw
  • Sort Method: quicksort Memory: 2831kB
30. 146.288 146.288 ↓ 2.5 26,394 1

Index Scan using form_metadata_formname on form_metadata form (cost=0.43..16,391.49 rows=10,739 width=40) (actual time=18.437..146.288 rows=26,394 loops=1)

  • Index Cond: (formname = ANY ('{immunization_follow_up,immunization_referral_follow_up,immunization_registration,immunization_visit}'::text[]))
  • Filter: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Rows Removed by Filter: 38781
31. 0.001 25.182 ↓ 0.0 0 1

Hash (cost=1,787.32..1,787.32 rows=537 width=49) (actual time=25.182..25.182 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
32. 0.001 25.181 ↓ 0.0 0 1

Subquery Scan on u2_defaulters_treated (cost=1,768.85..1,787.32 rows=537 width=49) (actual time=25.181..25.181 rows=0 loops=1)

33. 0.001 25.180 ↓ 0.0 0 1

GroupAggregate (cost=1,768.85..1,781.95 rows=537 width=49) (actual time=25.180..25.180 rows=0 loops=1)

  • Group Key: i.chw, 0
34. 0.003 25.179 ↓ 0.0 0 1

Sort (cost=1,768.85..1,770.78 rows=773 width=78) (actual time=25.179..25.179 rows=0 loops=1)

  • Sort Key: i.chw
  • Sort Method: quicksort Memory: 25kB
35. 0.102 25.176 ↓ 0.0 0 1

Hash Join (cost=1,168.03..1,731.77 rows=773 width=78) (actual time=25.176..25.176 rows=0 loops=1)

  • Hash Cond: (i.patient_id = useview_immunization_follow_up_dashboard.patient_id)
36. 6.454 6.454 ↑ 2.0 392 1

Index Scan using useview_immunization_visit_dashboard_uuid on useview_immunization_visit_dashboard i (cost=0.44..553.55 rows=773 width=74) (actual time=0.077..6.454 rows=392 loops=1)

  • Index Cond: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::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: 4227
37. 1.959 18.620 ↑ 1.0 8,117 1

Hash (cost=1,066.04..1,066.04 rows=8,124 width=37) (actual time=18.620..18.620 rows=8,117 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 611kB
38. 8.285 16.661 ↑ 1.0 8,117 1

HashAggregate (cost=984.80..1,066.04 rows=8,124 width=37) (actual time=15.232..16.661 rows=8,117 loops=1)

  • Group Key: useview_immunization_follow_up_dashboard.patient_id
39. 8.376 8.376 ↑ 1.0 22,122 1

Seq Scan on useview_immunization_follow_up_dashboard (cost=0.00..929.44 rows=22,144 width=37) (actual time=0.034..8.376 rows=22,122 loops=1)

40. 0.206 74.815 ↓ 1.1 596 1

Hash (cost=1,946.58..1,946.58 rows=537 width=49) (actual time=74.815..74.815 rows=596 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 57kB
41. 0.082 74.609 ↓ 1.1 596 1

Subquery Scan on u5_child_numerator (cost=1,928.11..1,946.58 rows=537 width=49) (actual time=71.083..74.609 rows=596 loops=1)

42. 3.158 74.527 ↓ 1.1 596 1

GroupAggregate (cost=1,928.11..1,941.21 rows=537 width=49) (actual time=71.082..74.527 rows=596 loops=1)

  • Group Key: i_1.chw, 0
43. 4.728 71.369 ↓ 5.1 3,939 1

Sort (cost=1,928.11..1,930.04 rows=773 width=78) (actual time=71.063..71.369 rows=3,939 loops=1)

  • Sort Key: i_1.chw
  • Sort Method: quicksort Memory: 650kB
44. 3.978 66.641 ↓ 5.1 3,939 1

Nested Loop (cost=1.00..1,891.02 rows=773 width=78) (actual time=0.066..66.641 rows=3,939 loops=1)

45. 7.517 7.517 ↓ 5.1 3,939 1

Index Scan using useview_immunization_visit_dashboard_uuid on useview_immunization_visit_dashboard i_1 (cost=0.44..553.55 rows=773 width=111) (actual time=0.032..7.517 rows=3,939 loops=1)

  • Index Cond: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: ((patient_age_in_months <> ''::text) AND (NOT (defaulter)::boolean) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 680
46. 55.146 55.146 ↑ 1.0 1 3,939

Index Only Scan using form_metadata_uuid on form_metadata form_1 (cost=0.56..1.73 rows=1 width=36) (actual time=0.014..0.014 rows=1 loops=3,939)

  • Index Cond: (uuid = i_1.uuid)
  • Heap Fetches: 2820
47. 0.142 10.670 ↑ 1.2 442 1

Hash (cost=609.10..609.10 rows=537 width=49) (actual time=10.670..10.670 rows=442 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 45kB
48. 0.060 10.528 ↑ 1.2 442 1

Subquery Scan on u2_child_numerator (cost=590.63..609.10 rows=537 width=49) (actual time=8.450..10.528 rows=442 loops=1)

49. 1.850 10.468 ↑ 1.2 442 1

GroupAggregate (cost=590.63..603.73 rows=537 width=49) (actual time=8.449..10.468 rows=442 loops=1)

  • Group Key: i_2.chw, 0
50. 2.597 8.618 ↓ 3.0 2,309 1

Sort (cost=590.63..592.56 rows=773 width=78) (actual time=8.439..8.618 rows=2,309 loops=1)

  • Sort Key: i_2.chw
  • Sort Method: quicksort Memory: 421kB
51. 6.021 6.021 ↓ 3.0 2,309 1

Index Scan using useview_immunization_visit_dashboard_uuid on useview_immunization_visit_dashboard i_2 (cost=0.44..553.55 rows=773 width=78) (actual time=0.034..6.021 rows=2,309 loops=1)

  • Index Cond: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Filter: ((patient_age_in_months <> ''::text) AND (NOT (defaulter)::boolean) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 2310
52. 0.287 154.938 ↓ 26.3 605 1

Sort (cost=18,549.22..18,549.28 rows=23 width=48) (actual time=154.883..154.938 rows=605 loops=1)

  • Sort Key: u2_children_registered.chw_uuid, u2_children_registered.interval_number
  • Sort Method: quicksort Memory: 110kB
53. 0.085 154.651 ↓ 26.3 605 1

Subquery Scan on u2_children_registered (cost=18,548.01..18,548.70 rows=23 width=48) (actual time=151.724..154.651 rows=605 loops=1)

54. 2.607 154.566 ↓ 26.3 605 1

GroupAggregate (cost=18,548.01..18,548.47 rows=23 width=48) (actual time=151.723..154.566 rows=605 loops=1)

  • Group Key: form_2.chw, 0
55. 3.586 151.959 ↓ 139.7 3,214 1

Sort (cost=18,548.01..18,548.07 rows=23 width=72) (actual time=151.706..151.959 rows=3,214 loops=1)

  • Sort Key: form_2.chw
  • Sort Method: quicksort Memory: 548kB
56. 3.936 148.373 ↓ 139.7 3,214 1

Hash Join (cost=18,311.04..18,547.49 rows=23 width=72) (actual time=140.136..148.373 rows=3,214 loops=1)

  • Hash Cond: (useview_immunization_follow_up_dashboard_1.uuid = form_2.uuid)
57. 13.247 29.472 ↓ 1.6 17,131 1

HashAggregate (cost=1,785.31..1,889.82 rows=10,451 width=96) (actual time=25.139..29.472 rows=17,131 loops=1)

  • Group Key: useview_immunization_follow_up_dashboard_1.patient_id, useview_immunization_follow_up_dashboard_1.patient_age_in_months, useview_immunization_follow_up_dashboard_1.uuid
58. 1.736 16.225 ↓ 1.6 17,131 1

Append (cost=0.00..1,706.93 rows=10,451 width=96) (actual time=0.015..16.225 rows=17,131 loops=1)

59. 8.495 8.495 ↓ 1.6 11,629 1

Seq Scan on useview_immunization_follow_up_dashboard useview_immunization_follow_up_dashboard_1 (cost=0.00..1,150.88 rows=7,381 width=76) (actual time=0.014..8.495 rows=11,629 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 10493
60. 5.994 5.994 ↓ 1.8 5,502 1

Seq Scan on useview_immunization_visit_dashboard (cost=0.00..399.28 rows=3,070 width=76) (actual time=0.009..5.994 rows=5,502 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 23))
  • Rows Removed by Filter: 3715
61. 9.586 114.965 ↓ 2.5 26,394 1

Hash (cost=16,391.49..16,391.49 rows=10,739 width=72) (actual time=114.965..114.965 rows=26,394 loops=1)

  • Buckets: 32768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 2989kB
62. 105.379 105.379 ↓ 2.5 26,394 1

Index Scan using form_metadata_formname on form_metadata form_2 (cost=0.43..16,391.49 rows=10,739 width=72) (actual time=16.161..105.379 rows=26,394 loops=1)

  • Index Cond: (formname = ANY ('{immunization_follow_up,immunization_referral_follow_up,immunization_registration,immunization_visit}'::text[]))
  • Filter: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Rows Removed by Filter: 38781
63. 1.438 145.561 ↓ 3.3 8,685 1

Materialize (cost=19,252.17..19,981.37 rows=2,609 width=48) (actual time=110.022..145.561 rows=8,685 loops=1)

64. 24.018 144.123 ↑ 1.7 1,510 1

GroupAggregate (cost=19,252.17..19,948.76 rows=2,609 width=48) (actual time=110.019..144.123 rows=1,510 loops=1)

  • Group Key: form_3.chw, 0
65. 81.773 120.105 ↑ 1.0 65,175 1

Sort (cost=19,252.17..19,419.79 rows=67,050 width=40) (actual time=109.996..120.105 rows=65,175 loops=1)

  • Sort Key: form_3.chw
  • Sort Method: quicksort Memory: 6628kB
66. 38.332 38.332 ↑ 1.0 65,175 1

Index Scan using form_metadata_formname on form_metadata form_3 (cost=0.43..13,877.12 rows=67,050 width=40) (actual time=0.036..38.332 rows=65,175 loops=1)

  • Index Cond: (formname = ANY ('{immunization_follow_up,immunization_referral_follow_up,immunization_registration,immunization_visit}'::text[]))
67. 0.637 170.364 ↓ 199.3 4,584 1

Materialize (cost=18,548.01..18,548.76 rows=23 width=48) (actual time=163.419..170.364 rows=4,584 loops=1)

68. 5.364 169.727 ↓ 34.3 789 1

GroupAggregate (cost=18,548.01..18,548.47 rows=23 width=48) (actual time=163.416..169.727 rows=789 loops=1)

  • Group Key: form_4.chw, 0
69. 7.083 164.363 ↓ 248.4 5,713 1

Sort (cost=18,548.01..18,548.07 rows=23 width=72) (actual time=163.399..164.363 rows=5,713 loops=1)

  • Sort Key: form_4.chw
  • Sort Method: quicksort Memory: 996kB
70. 6.482 157.280 ↓ 248.4 5,713 1

Hash Join (cost=18,311.04..18,547.49 rows=23 width=72) (actual time=143.765..157.280 rows=5,713 loops=1)

  • Hash Cond: (useview_immunization_visit_dashboard_1.uuid = form_4.uuid)
71. 21.001 36.034 ↓ 2.5 26,495 1

HashAggregate (cost=1,785.31..1,889.82 rows=10,451 width=96) (actual time=28.979..36.034 rows=26,495 loops=1)

  • Group Key: useview_immunization_visit_dashboard_1.patient_id, useview_immunization_visit_dashboard_1.patient_age_in_months, useview_immunization_visit_dashboard_1.uuid
72. 2.626 15.033 ↓ 2.5 26,495 1

Append (cost=0.00..1,706.93 rows=10,451 width=96) (actual time=0.012..15.033 rows=26,495 loops=1)

73. 3.432 3.432 ↓ 3.0 9,103 1

Seq Scan on useview_immunization_visit_dashboard useview_immunization_visit_dashboard_1 (cost=0.00..399.28 rows=3,070 width=76) (actual time=0.011..3.432 rows=9,103 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 114
74. 8.975 8.975 ↓ 2.4 17,392 1

Seq Scan on useview_immunization_follow_up_dashboard useview_immunization_follow_up_dashboard_2 (cost=0.00..1,150.88 rows=7,381 width=76) (actual time=0.009..8.975 rows=17,392 loops=1)

  • Filter: ((patient_age_in_months <> ''::text) AND ((patient_age_in_months)::integer <= 59))
  • Rows Removed by Filter: 4730
75. 9.106 114.764 ↓ 2.5 26,394 1

Hash (cost=16,391.49..16,391.49 rows=10,739 width=72) (actual time=114.764..114.764 rows=26,394 loops=1)

  • Buckets: 32768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 2989kB
76. 105.658 105.658 ↓ 2.5 26,394 1

Index Scan using form_metadata_formname on form_metadata form_4 (cost=0.43..16,391.49 rows=10,739 width=72) (actual time=16.187..105.658 rows=26,394 loops=1)

  • Index Cond: (formname = ANY ('{immunization_follow_up,immunization_referral_follow_up,immunization_registration,immunization_visit}'::text[]))
  • Filter: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::timestamp with time zone + '1 day'::interval))::timestamp without time zone))
  • Rows Removed by Filter: 38781
77. 0.068 6.276 ↑ 2.5 216 1

Hash (cost=609.10..609.10 rows=537 width=49) (actual time=6.276..6.276 rows=216 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
78. 0.031 6.208 ↑ 2.5 216 1

Subquery Scan on u2_defaulters (cost=590.63..609.10 rows=537 width=49) (actual time=5.718..6.208 rows=216 loops=1)

79. 0.437 6.177 ↑ 2.5 216 1

GroupAggregate (cost=590.63..603.73 rows=537 width=49) (actual time=5.716..6.177 rows=216 loops=1)

  • Group Key: i_3.chw, 0
80. 0.435 5.740 ↑ 2.0 392 1

Sort (cost=590.63..592.56 rows=773 width=78) (actual time=5.706..5.740 rows=392 loops=1)

  • Sort Key: i_3.chw
  • Sort Method: quicksort Memory: 80kB
81. 5.305 5.305 ↑ 2.0 392 1

Index Scan using useview_immunization_visit_dashboard_uuid on useview_immunization_visit_dashboard i_3 (cost=0.44..553.55 rows=773 width=78) (actual time=0.050..5.305 rows=392 loops=1)

  • Index Cond: ((reported >= (((date_trunc('quarter'::text, now()))::date - '3 mons'::interval))::timestamp without time zone) AND (reported < (((((date_trunc('quarter'::text, now()))::date - '1 day'::interval))::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: 4227
Planning time : 45.419 ms
Execution time : 1,091.467 ms