explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R1aK

Settings
# exclusive inclusive rows x rows loops node
1. 0.496 18,134.720 ↑ 59.4 88 1

HashAggregate (cost=1,539,249.86..1,539,302.12 rows=5,226 width=417) (actual time=18,134.617..18,134.720 rows=88 loops=1)

  • Group Key: d.data_source_type, d.data_source_id, d.data_source_name, d.indicator_id, d.indicator_name, d.indicator_security_level, d.indicator_description, d.indicator_group_short_name, d.indicator_group_name, d.sort_order, d.data_date, d.upload_date, d.report_period, d.start_date, (CASE WHEN ((d.has_access = 0) OR ((lower(d.organization_type) = 'partner'::text) AND (lower(d.indicator_security_level) = 'context dependent'::text) AND (lower(d.data_source_type) <> ALL ('{organization,member}'::text[])))) THEN 'Not Shared'::text ELSE (d.numerator)::text END), (CASE WHEN ((d.has_access = 0) OR ((lower(d.organization_type) = 'partner'::text) AND (lower(d.indicator_security_level) = 'context dependent'::text) AND (lower(d.data_source_type) <> ALL ('{organization,member}'::text[])))) THEN 'Not Shared'::text ELSE (d.denominator)::text END), (CASE WHEN ((d.has_access = 0) OR ((lower(d.organization_type) = 'partner'::text) AND (lower(d.indicator_security_level) = 'context dependent'::text) AND (lower(d.data_source_type) <> ALL ('{organization,member}'::text[])))) THEN 'Not Shared'::text ELSE (d.percent)::text END), d.message, ((d.ranking)::integer), d.favorite
2.          

CTE expanded

3. 0.103 9.359 ↑ 9,992.5 112 1

Unique (cost=432,838.78..472,009.24 rows=1,119,156 width=245) (actual time=9.242..9.359 rows=112 loops=1)

4. 0.327 9.256 ↑ 8,229.1 136 1

Sort (cost=432,838.78..435,636.67 rows=1,119,156 width=245) (actual time=9.241..9.256 rows=136 loops=1)

  • Sort Key: ((string_to_array(my_data_source_preferences.id, ':'::text))[1]), (((string_to_array(my_data_source_preferences.id, ':'::text))[2])::integer), my_data_source_preferences.name, i.id, (COALESCE(ig.name, i.name)), i.name, isl.name, isl.id, i.description, i.indicator_group_short_name, i.sort_order, cm.organization_id, (CASE WHEN (iaf.account_id IS NULL) THEN false ELSE true END)
  • Sort Method: quicksort Memory: 75kB
5. 0.027 8.929 ↑ 8,229.1 136 1

Append (cost=160.35..60,277.29 rows=1,119,156 width=245) (actual time=8.419..8.929 rows=136 loops=1)

6. 0.306 8.893 ↑ 8,227.9 136 1

Hash Left Join (cost=160.35..43,330.90 rows=1,118,989 width=324) (actual time=8.419..8.893 rows=136 loops=1)

  • Hash Cond: (i.id = iaf.indicator_id)
7. 0.077 8.546 ↑ 8,227.9 136 1

Hash Join (cost=154.41..27,913.49 rows=1,118,989 width=319) (actual time=8.355..8.546 rows=136 loops=1)

  • Hash Cond: (ic_1.channel_id = ch.id)
8. 0.069 8.448 ↑ 14,398.8 136 1

Merge Join (cost=144.94..9,370.77 rows=1,958,231 width=319) (actual time=8.327..8.448 rows=136 loops=1)

  • Merge Cond: (sd.id = d_1.id)
9. 0.029 2.761 ↑ 57.6 34 1

Merge Join (cost=144.55..175.91 rows=1,958 width=263) (actual time=2.726..2.761 rows=34 loops=1)

  • Merge Cond: (idd.domain_id = sd.id)
10. 0.225 1.692 ↑ 11.2 35 1

Sort (cost=84.47..85.45 rows=392 width=259) (actual time=1.687..1.692 rows=35 loops=1)

  • Sort Key: idd.domain_id
  • Sort Method: quicksort Memory: 151kB
11. 0.137 1.467 ↓ 1.1 416 1

Hash Left Join (cost=50.29..67.59 rows=392 width=259) (actual time=0.870..1.467 rows=416 loops=1)

  • Hash Cond: (i.indicator_group_id = ig.id)
12. 0.176 1.313 ↓ 1.1 416 1

Hash Join (cost=48.75..64.99 rows=392 width=231) (actual time=0.847..1.313 rows=416 loops=1)

  • Hash Cond: (i.indicator_security_level_id = isl.id)
13. 0.234 1.131 ↓ 1.1 416 1

Hash Join (cost=47.71..60.73 rows=392 width=199) (actual time=0.835..1.131 rows=416 loops=1)

  • Hash Cond: (idd.indicator_id = i.id)
14. 0.075 0.075 ↓ 1.0 445 1

Seq Scan on indicator_domain idd (cost=0.00..7.44 rows=444 width=8) (actual time=0.008..0.075 rows=445 loops=1)

15. 0.165 0.822 ↓ 1.0 391 1

Hash (cost=42.84..42.84 rows=389 width=199) (actual time=0.822..0.822 rows=391 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
16. 0.174 0.657 ↓ 1.0 391 1

Hash Join (cost=34.92..42.84 rows=389 width=199) (actual time=0.440..0.657 rows=391 loops=1)

  • Hash Cond: (ic_1.indicator_id = i.id)
17. 0.056 0.056 ↓ 1.0 391 1

Seq Scan on indicator_channel ic_1 (cost=0.00..6.89 rows=389 width=8) (actual time=0.007..0.056 rows=391 loops=1)

18. 0.178 0.427 ↑ 1.0 426 1

Hash (cost=29.41..29.41 rows=441 width=191) (actual time=0.426..0.427 rows=426 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
19. 0.249 0.249 ↑ 1.0 426 1

Seq Scan on indicator i (cost=0.00..29.41 rows=441 width=191) (actual time=0.006..0.249 rows=426 loops=1)

20. 0.002 0.006 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=36) (actual time=0.006..0.006 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.004 0.004 ↑ 1.0 2 1

Seq Scan on indicator_security_level isl (cost=0.00..1.02 rows=2 width=36) (actual time=0.004..0.004 rows=2 loops=1)

22. 0.007 0.017 ↓ 1.0 25 1

Hash (cost=1.24..1.24 rows=24 width=36) (actual time=0.017..0.017 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
23. 0.010 0.010 ↓ 1.0 25 1

Seq Scan on indicator_group ig (cost=0.00..1.24 rows=24 width=36) (actual time=0.005..0.010 rows=25 loops=1)

24. 0.008 1.040 ↑ 1,000.0 1 1

Sort (cost=60.08..62.58 rows=1,000 width=4) (actual time=1.036..1.040 rows=1 loops=1)

  • Sort Key: sd.id
  • Sort Method: quicksort Memory: 25kB
25. 1.032 1.032 ↑ 1,000.0 1 1

Function Scan on subdomains sd (cost=0.25..10.25 rows=1,000 width=4) (actual time=1.032..1.032 rows=1 loops=1)

26. 0.023 5.618 ↑ 379.3 145 1

Materialize (cost=0.39..1,250.72 rows=55,000 width=68) (actual time=5.587..5.618 rows=145 loops=1)

27. 0.008 5.595 ↑ 4,230.8 13 1

Nested Loop (cost=0.39..1,113.22 rows=55,000 width=68) (actual time=5.586..5.595 rows=13 loops=1)

28. 0.007 0.007 ↑ 13.8 4 1

Index Only Scan using pk_domain on domain d_1 (cost=0.14..12.97 rows=55 width=4) (actual time=0.005..0.007 rows=4 loops=1)

  • Heap Fetches: 4
29. 5.580 5.580 ↑ 333.3 3 4

Function Scan on my_data_source_preferences (cost=0.25..10.25 rows=1,000 width=64) (actual time=1.395..1.395 rows=3 loops=4)

30. 0.003 0.021 ↓ 1.5 6 1

Hash (cost=9.42..9.42 rows=4 width=8) (actual time=0.021..0.021 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.002 0.018 ↓ 1.5 6 1

Nested Loop (cost=0.28..9.42 rows=4 width=8) (actual time=0.015..0.018 rows=6 loops=1)

32. 0.010 0.010 ↑ 1.0 1 1

Index Scan using pk_organization_member on organization_member cm (cost=0.28..8.31 rows=1 width=4) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (id = 993)
  • Filter: ((account_id = 453) AND (member_status_id = 'A'::bpchar))
33. 0.006 0.006 ↓ 1.5 6 1

Seq Scan on channel ch (cost=0.00..1.07 rows=4 width=4) (actual time=0.005..0.006 rows=6 loops=1)

  • Filter: (active IS TRUE)
  • Rows Removed by Filter: 1
34. 0.000 0.041 ↓ 0.0 0 1

Hash (cost=5.93..5.93 rows=1 width=8) (actual time=0.041..0.041 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
35. 0.041 0.041 ↓ 0.0 0 1

Seq Scan on indicator_account_favorite iaf (cost=0.00..5.93 rows=1 width=8) (actual time=0.041..0.041 rows=0 loops=1)

  • Filter: (453 = account_id)
  • Rows Removed by Filter: 338
36. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=104.34..159.05 rows=167 width=324) (actual time=0.009..0.009 rows=0 loops=1)

37. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on domain d_2 (cost=0.00..1.82 rows=1 width=0) (actual time=0.008..0.009 rows=0 loops=1)

  • Filter: ((id = 3) AND (name = 'My Favourites'::text))
  • Rows Removed by Filter: 55
38. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=104.34..153.89 rows=167 width=319) (never executed)

  • Hash Cond: ((ch_1.id = s_1.channel_id) AND (cm_1.organization_id = s_1.organization_id))
39. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=7.14..54.04 rows=504 width=327) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=6.61..15.48 rows=1 width=259) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=6.48..15.28 rows=1 width=255) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=6.34..15.10 rows=1 width=227) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=6.21..14.90 rows=1 width=195) (never executed)

  • Join Filter: (iaf_1.indicator_id = i_1.id)
44. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=5.94..14.30 rows=1 width=12) (never executed)

  • Hash Cond: (ic_2.indicator_id = iaf_1.indicator_id)
45. 0.000 0.000 ↓ 0.0 0

Seq Scan on indicator_channel ic_2 (cost=0.00..6.89 rows=389 width=8) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Hash (cost=5.93..5.93 rows=1 width=4) (never executed)

47. 0.000 0.000 ↓ 0.0 0

Seq Scan on indicator_account_favorite iaf_1 (cost=0.00..5.93 rows=1 width=4) (never executed)

  • Filter: (account_id = 453)
48. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_indicator on indicator i_1 (cost=0.27..0.59 rows=1 width=191) (never executed)

  • Index Cond: (id = ic_2.indicator_id)
49. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_indicator_security_level on indicator_security_level isl_1 (cost=0.13..0.17 rows=1 width=36) (never executed)

  • Index Cond: (id = i_1.indicator_security_level_id)
50. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_indicator_group on indicator_group ig_1 (cost=0.14..0.18 rows=1 width=36) (never executed)

  • Index Cond: (id = i_1.indicator_group_id)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_channel on channel ch_1 (cost=0.13..0.18 rows=1 width=4) (never executed)

  • Index Cond: (id = ic_2.channel_id)
  • Filter: (active IS TRUE)
52. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.53..28.55 rows=1,000 width=68) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_organization_member on organization_member cm_1 (cost=0.28..8.31 rows=1 width=4) (never executed)

  • Index Cond: (id = 993)
  • Filter: ((account_id = 453) AND (member_status_id = 'A'::bpchar))
54. 0.000 0.000 ↓ 0.0 0

Function Scan on my_data_source_preferences my_data_source_preferences_1 (cost=0.25..10.25 rows=1,000 width=64) (never executed)

55. 0.000 0.000 ↓ 0.0 0

Hash (cost=90.04..90.04 rows=477 width=8) (never executed)

56. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on account_subscription s_1 (cost=12.02..90.04 rows=477 width=8) (never executed)

  • Recheck Cond: (account_id = 453)
  • Filter: (active IS TRUE)
57. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_account_subscription_account_id (cost=0.00..11.90 rows=482 width=0) (never executed)

  • Index Cond: (account_id = 453)
58.          

CTE data

59. 0.558 18,132.610 ↑ 5,567.9 201 1

WindowAgg (cost=990,659.15..1,041,021.17 rows=1,119,156 width=361) (actual time=18,132.028..18,132.610 rows=201 loops=1)

60. 0.429 18,132.052 ↑ 5,567.9 201 1

Sort (cost=990,659.15..993,457.04 rows=1,119,156 width=336) (actual time=18,132.008..18,132.052 rows=201 loops=1)

  • Sort Key: e.data_source_type, e.data_source_id, e.indicator_id, ad.report_period_start DESC, ad.data_date DESC, ad.upload_date DESC
  • Sort Method: quicksort Memory: 121kB
61. 0.123 18,131.623 ↑ 5,567.9 201 1

Hash Join (cost=484,057.34..533,943.66 rows=1,119,156 width=336) (actual time=18,103.047..18,131.623 rows=201 loops=1)

  • Hash Cond: (o_1.organization_type_id = ot.id)
62. 0.118 18,131.488 ↑ 5,567.9 201 1

Hash Join (cost=484,056.27..526,854.60 rows=1,119,156 width=308) (actual time=18,103.025..18,131.488 rows=201 loops=1)

  • Hash Cond: (om.organization_id = o_1.id)
63. 0.075 18,131.220 ↑ 5,567.9 201 1

Nested Loop (cost=484,046.04..523,845.56 rows=1,119,156 width=308) (actual time=18,102.867..18,131.220 rows=201 loops=1)

64. 2.037 2.037 ↑ 1.0 1 1

Index Scan using idx_clinic_member_clinic_id on organization_member om (cost=0.28..356.41 rows=1 width=4) (actual time=0.713..2.037 rows=1 loops=1)

  • Filter: (id = 993)
  • Rows Removed by Filter: 4901
65. 0.089 18,129.108 ↑ 5,567.9 201 1

Hash Left Join (cost=484,045.76..512,297.59 rows=1,119,156 width=304) (actual time=18,102.151..18,129.108 rows=201 loops=1)

  • Hash Cond: (cm_2.organization_id = c.id)
66. 0.155 18,128.923 ↑ 5,567.9 201 1

Hash Left Join (cost=484,035.53..509,288.54 rows=1,119,156 width=285) (actual time=18,102.048..18,128.923 rows=201 loops=1)

  • Hash Cond: (e.data_source_id = cm_2.id)
  • Join Filter: (e.data_source_type = 'Member'::text)
  • Rows Removed by Join Filter: 147
67. 0.921 18,126.925 ↑ 5,567.9 201 1

Merge Left Join (cost=483,872.62..506,187.83 rows=1,119,156 width=281) (actual time=18,100.177..18,126.925 rows=201 loops=1)

  • Merge Cond: ((e.data_source_type = dsl.type) AND (e.data_source_id = dsl.id) AND (e.indicator_id = dsl.indicator_id))
  • Join Filter: (dsl.time_period_id = ad.report_period_id)
  • Rows Removed by Join Filter: 2927
68. 6.674 1,737.323 ↑ 5,567.9 201 1

Merge Left Join (cost=483,812.54..497,722.33 rows=1,119,156 width=281) (actual time=1,711.998..1,737.323 rows=201 loops=1)

  • Merge Cond: ((e.data_source_type = ad.data_source_type) AND (e.data_source_id = ad.data_source_id) AND (e.indicator_id = ad.indicator_id))
69. 0.094 9.525 ↑ 9,992.5 112 1

Sort (cost=387,293.61..390,091.50 rows=1,119,156 width=237) (actual time=9.504..9.525 rows=112 loops=1)

  • Sort Key: e.data_source_type, e.data_source_id, e.indicator_id
  • Sort Method: quicksort Memory: 63kB
70. 9.431 9.431 ↑ 9,992.5 112 1

CTE Scan on expanded e (cost=0.00..22,383.12 rows=1,119,156 width=237) (actual time=9.245..9.431 rows=112 loops=1)

71. 6.587 1,721.124 ↑ 7.9 26,567 1

Materialize (cost=96,518.93..97,570.69 rows=210,352 width=67) (actual time=1,702.344..1,721.124 rows=26,567 loops=1)

72. 710.078 1,714.537 ↑ 7.9 26,567 1

Sort (cost=96,518.93..97,044.81 rows=210,352 width=67) (actual time=1,702.341..1,714.537 rows=26,567 loops=1)

  • Sort Key: ad.data_source_type, ad.data_source_id, ad.indicator_id
  • Sort Method: external merge Disk: 15616kB
73. 1,004.459 1,004.459 ↓ 1.0 215,083 1

Seq Scan on aggregate_data ad (cost=0.00..69,290.24 rows=210,352 width=67) (actual time=3.091..1,004.459 rows=215,083 loops=1)

  • Filter: (report_period_start >= (now() - '9 mons'::interval))
  • Rows Removed by Filter: 1982546
74. 178.408 16,388.681 ↓ 3.1 3,085 1

Sort (cost=60.08..62.58 rows=1,000 width=44) (actual time=16,388.158..16,388.681 rows=3,085 loops=1)

  • Sort Key: dsl.type, dsl.id, dsl.indicator_id
  • Sort Method: external sort Disk: 9712kB
75. 16,210.273 16,210.273 ↓ 233.0 232,968 1

Function Scan on data_points_valid_list dsl (cost=0.25..10.25 rows=1,000 width=44) (actual time=16,153.188..16,210.273 rows=232,968 loops=1)

76. 0.967 1.843 ↑ 1.1 4,902 1

Hash (cost=97.96..97.96 rows=5,196 width=8) (actual time=1.843..1.843 rows=4,902 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 256kB
77. 0.876 0.876 ↑ 1.1 4,902 1

Seq Scan on organization_member cm_2 (cost=0.00..97.96 rows=5,196 width=8) (actual time=0.019..0.876 rows=4,902 loops=1)

78. 0.043 0.096 ↓ 1.1 206 1

Hash (cost=7.88..7.88 rows=188 width=27) (actual time=0.096..0.096 rows=206 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
79. 0.053 0.053 ↓ 1.1 206 1

Seq Scan on organization c (cost=0.00..7.88 rows=188 width=27) (actual time=0.008..0.053 rows=206 loops=1)

80. 0.047 0.150 ↓ 1.1 206 1

Hash (cost=7.88..7.88 rows=188 width=8) (actual time=0.150..0.150 rows=206 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
81. 0.103 0.103 ↓ 1.1 206 1

Seq Scan on organization o_1 (cost=0.00..7.88 rows=188 width=8) (actual time=0.007..0.103 rows=206 loops=1)

82. 0.004 0.012 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=36) (actual time=0.012..0.012 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
83. 0.008 0.008 ↑ 1.0 3 1

Seq Scan on organization_type ot (cost=0.00..1.03 rows=3 width=36) (actual time=0.006..0.008 rows=3 loops=1)

84. 0.021 18,134.224 ↑ 59.4 88 1

Append (cost=35.33..25,958.15 rows=5,226 width=417) (actual time=18,132.858..18,134.224 rows=88 loops=1)

85. 0.325 18,134.191 ↑ 59.4 88 1

Nested Loop (cost=35.33..25,879.75 rows=5,225 width=417) (actual time=18,132.856..18,134.191 rows=88 loops=1)

  • Join Filter: (ic.channel_id = s.channel_id)
  • Rows Removed by Join Filter: 176
86. 0.074 0.074 ↑ 2.5 2 1

Index Scan using account_subscription_account_id_organization_id_channel_id_key on account_subscription s (cost=0.29..20.87 rows=5 width=8) (actual time=0.063..0.074 rows=2 loops=1)

  • Index Cond: ((account_id = 453) AND (organization_id = 92))
  • Filter: (active IS TRUE)
87. 0.125 18,133.792 ↑ 23.7 132 2

Materialize (cost=35.04..25,265.92 rows=3,134 width=393) (actual time=9,066.346..9,066.896 rows=132 loops=2)

88. 0.121 18,133.667 ↑ 23.7 132 1

Hash Join (cost=35.04..25,250.25 rows=3,134 width=393) (actual time=18,132.687..18,133.667 rows=132 loops=1)

  • Hash Cond: (d.indicator_id = iemr.indicator_id)
89. 18,132.913 18,132.913 ↑ 50.0 112 1

CTE Scan on data d (cost=0.00..25,181.01 rows=5,596 width=385) (actual time=18,132.033..18,132.913 rows=112 loops=1)

  • Filter: (ranking = 1)
  • Rows Removed by Filter: 89
90. 0.088 0.633 ↓ 3.5 375 1

Hash (cost=33.72..33.72 rows=106 width=16) (actual time=0.633..0.633 rows=375 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
91. 0.147 0.545 ↓ 3.5 375 1

Hash Join (cost=24.31..33.72 rows=106 width=16) (actual time=0.357..0.545 rows=375 loops=1)

  • Hash Cond: (ic.indicator_id = iemr.indicator_id)
92. 0.060 0.060 ↓ 1.0 391 1

Seq Scan on indicator_channel ic (cost=0.00..6.89 rows=389 width=8) (actual time=0.012..0.060 rows=391 loops=1)

93. 0.083 0.338 ↓ 3.1 373 1

Hash (cost=22.78..22.78 rows=122 width=8) (actual time=0.338..0.338 rows=373 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
94. 0.110 0.255 ↓ 3.1 373 1

Nested Loop (cost=0.42..22.78 rows=122 width=8) (actual time=0.042..0.255 rows=373 loops=1)

  • Join Filter: (o.electronic_medical_record_id = iemr.electronic_medical_record_id)
95. 0.004 0.021 ↑ 1.0 1 1

Nested Loop (cost=0.14..9.37 rows=1 width=12) (actual time=0.020..0.021 rows=1 loops=1)

  • Join Filter: (o.electronic_medical_record_id = emr.id)
  • Rows Removed by Join Filter: 6
96. 0.013 0.013 ↑ 1.0 1 1

Index Scan using pk_organization on organization o (cost=0.14..8.16 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (id = 92)
97. 0.004 0.004 ↑ 1.3 7 1

Seq Scan on electronic_medical_record emr (cost=0.00..1.09 rows=9 width=4) (actual time=0.004..0.004 rows=7 loops=1)

98. 0.124 0.124 ↓ 1.4 373 1

Index Scan using idx_indicator_emr_emr_id on indicator_electronic_medical_record iemr (cost=0.28..9.98 rows=275 width=8) (actual time=0.017..0.124 rows=373 loops=1)

  • Index Cond: (electronic_medical_record_id = emr.id)
99. 0.001 0.012 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.01..0.02 rows=1 width=417) (actual time=0.012..0.012 rows=0 loops=1)

100. 0.010 0.011 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=0 width=453) (actual time=0.010..0.011 rows=0 loops=1)

  • Sort Key: (CASE data_source_type WHEN 'Member'::text THEN 1 WHEN 'Organization'::text THEN 2 WHEN 'User Defined Member Group'::text THEN 3 WHEN 'User Defined Organization Group'::text THEN 4 WHEN 'Local Health Area (LHA)'::text THEN 5 WHEN 'Health Service Delivery Area (HSDA)'::text THEN 6 WHEN 'Health Authority (HA)'::text THEN 7 WHEN 'Province'::text THEN 8 WHEN 'All'::text THEN 9 ELSE NULL::integer END), data_source_id, (COALESCE(indicator_group_short_name, indicator_name)), sort_order
  • Sort Method: quicksort Memory: 25kB
101. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=453) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
Planning time : 12.566 ms
Execution time : 18,145.910 ms