explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9dnD

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 85.538 ↑ 74.7 3 1

Sort (cost=2,254,755.39..2,254,755.95 rows=224 width=437) (actual time=85.538..85.538 rows=3 loops=1)

  • Sort Key: (COALESCE((min(pn.device_delivered_date_min)), (min(pn.person_delivered_date))))
  • Sort Method: quicksort Memory: 29kB
2.          

CTE get_event

3. 0.001 0.096 ↑ 1.0 1 1

Append (cost=0.42..4.97 rows=1 width=88) (actual time=0.095..0.096 rows=1 loops=1)

4. 0.095 0.095 ↑ 1.0 1 1

Index Scan using events_org_part_210_event_uuid_idx on events_org_part_210 e (cost=0.42..4.96 rows=1 width=88) (actual time=0.094..0.095 rows=1 loops=1)

  • Index Cond: (event_uuid = '8a9b2068-2a3d-4032-8bdd-f6393024d0ea'::uuid)
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2019-09-25 16:38:28.488+00'::timestamp with time zone) AND (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid))
  • Rows Removed by Filter: 1
5.          

CTE get_event_created_min

6. 0.004 0.005 ↑ 1.0 1 1

Aggregate (cost=0.02..0.03 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1)

7. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event e_1 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.001 rows=1 loops=1)

8.          

CTE get_event_created_max

9. 0.004 0.005 ↑ 1.0 1 1

Aggregate (cost=0.02..0.03 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1)

10. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event e_2 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

11.          

CTE get_event_closing_max

12. 0.010 0.011 ↑ 1.0 1 1

Aggregate (cost=0.02..0.04 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=1)

13. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event e_3 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.001 rows=1 loops=1)

14.          

CTE get_response_choices

15. 0.001 0.322 ↑ 6,666.7 3 1

Append (cost=0.42..1,008.53 rows=20,000 width=128) (actual time=0.301..0.322 rows=3 loops=1)

16. 0.009 0.318 ↑ 3,333.3 3 1

Nested Loop (cost=0.42..355.99 rows=10,000 width=128) (actual time=0.300..0.318 rows=3 loops=1)

17. 0.005 0.089 ↑ 1.0 1 1

Nested Loop (cost=0.42..3.47 rows=1 width=993) (actual time=0.087..0.089 rows=1 loops=1)

18. 0.002 0.002 ↑ 1.0 1 1

CTE Scan on get_event e_4 (cost=0.00..0.02 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=1)

  • Filter: (choices IS NULL)
19. 0.082 0.082 ↑ 1.0 1 1

Index Scan using forms_org_seq_vrange_uidx on forms f (cost=0.42..3.44 rows=1 width=1,028) (actual time=0.080..0.082 rows=1 loops=1)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (form_uuid = e_4.form_uuid))
  • Filter: ((is_visible IS TRUE) AND (valid_range @> e_4.created))
  • Rows Removed by Filter: 3
20. 0.112 0.220 ↑ 3,333.3 3 1

ProjectSet (cost=0.00..52.52 rows=10,000 width=64) (actual time=0.207..0.220 rows=3 loops=1)

21. 0.107 0.108 ↑ 33.3 3 1

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.107..0.108 rows=3 loops=1)

22. 0.001 0.001 ↑ 1.0 1 1

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

23. 0.001 0.003 ↓ 0.0 0 1

Nested Loop (cost=0.00..352.54 rows=10,000 width=128) (actual time=0.003..0.003 rows=0 loops=1)

24. 0.002 0.002 ↓ 0.0 0 1

CTE Scan on get_event e_5 (cost=0.00..0.02 rows=1 width=32) (actual time=0.001..0.002 rows=0 loops=1)

  • Filter: (choices IS NOT NULL)
  • Rows Removed by Filter: 1
25. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.00..52.52 rows=10,000 width=64) (never executed)

26. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

28.          

CTE get_response_matchers

29. 0.030 0.492 ↑ 666.7 3 1

HashAggregate (cost=800.00..845.00 rows=2,000 width=96) (actual time=0.474..0.492 rows=3 loops=1)

  • Group Key: lower(COALESCE(rc.translated_response, rc.text_response)), lower((replace(replace(COALESCE(rc.translated_response, rc.text_response), '%'::text, '\%'::text), '_'::text, '\_'::text) || ' %'::text)), rc.text_response
30. 0.462 0.462 ↑ 6,666.7 3 1

CTE Scan on get_response_choices rc (cost=0.00..650.00 rows=20,000 width=96) (actual time=0.432..0.462 rows=3 loops=1)

31.          

CTE get_lowered_responses_pattern_array

32. 0.044 0.545 ↑ 1.0 1 1

Aggregate (cost=45.00..45.01 rows=1 width=32) (actual time=0.545..0.545 rows=1 loops=1)

33. 0.501 0.501 ↑ 666.7 3 1

CTE Scan on get_response_matchers rc_1 (cost=0.00..40.00 rows=2,000 width=32) (actual time=0.476..0.501 rows=3 loops=1)

34.          

CTE get_person_device_notifications

35. 0.013 29.942 ↑ 1,869.6 12 1

Unique (cost=23,032.39..24,378.49 rows=22,435 width=368) (actual time=29.930..29.942 rows=12 loops=1)

36. 0.050 29.929 ↑ 1,869.6 12 1

Sort (cost=23,032.39..23,088.48 rows=22,435 width=368) (actual time=29.928..29.929 rows=12 loops=1)

  • Sort Key: person_ntfn.recipient_uuid, person_ntfn.notification_uuid, person_ntfn.event_uuid, person_ntfn.parent_ntfn_uuid, (CASE WHEN (person_ntfn.delinked_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN person_ntfn.delinked_date ELSE NULL::timestamp with time zone END), device_ntfn.recipient_uuid, device_ntfn.notification_uuid, (CASE WHEN (device_ntfn.failed_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN device_ntfn.failed_date ELSE NULL::timestamp with time zone END), (CASE WHEN (device_ntfn.delivered_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN device_ntfn.delivered_date ELSE NULL::timestamp with time zone END), (CASE WHEN ((device_response.received <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) AND (((device_response.response)::text || ' '::text) ~~* ANY ($11))) THEN device_ntfn.responded_date ELSE NULL::timestamp with time zone END), (CASE WHEN ((device_response.received <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) AND (((device_response.response)::text || ' '::text) ~~* ANY ($12))) THEN 'RESPONDED'::text WHEN (device_ntfn.delivered_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN 'DELIVERED'::text WHEN (device_ntfn.failed_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN 'FAILED'::text WHEN (live_ntfn.pending_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN 'PENDING'::text ELSE ''::text END), (CASE WHEN (live_ntfn.pending_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN live_ntfn.pending_date ELSE NULL::timestamp with time zone END), device_response.response_uuid, (CASE WHEN ((device_response.received <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) AND (((device_response.response)::text || ' '::text) ~~* ANY ($13))) THEN device_response.response ELSE NULL::character varying END), (CASE WHEN (device_response.received <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) THEN device_response.received ELSE NULL::timestamp with time zone END), device_response.recipient_type, (NULL::uuid), (NULL::character varying), (NULL::timestamp with time zone), (NULL::character varying), (NULL::timestamp with time zone), (NULL::timestamp with time zone), (NULL::timestamp with time zone)
  • Sort Method: quicksort Memory: 27kB
37. 0.004 29.879 ↑ 1,869.6 12 1

Append (cost=4,274.11..18,994.57 rows=22,435 width=368) (actual time=29.381..29.879 rows=12 loops=1)

38. 0.004 29.564 ↑ 5,422.2 4 1

Nested Loop (cost=4,274.11..14,718.51 rows=21,689 width=343) (actual time=29.379..29.564 rows=4 loops=1)

39.          

Initplan (for Nested Loop)

40. 0.547 0.547 ↑ 1.0 1 1

CTE Scan on get_lowered_responses_pattern_array rc_2 (cost=0.00..0.02 rows=1 width=32) (actual time=0.547..0.547 rows=1 loops=1)

41. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_lowered_responses_pattern_array rc_3 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.001 rows=1 loops=1)

42. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_lowered_responses_pattern_array rc_4 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=1)

43. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_6 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

44. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_7 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

45. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_8 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

46. 0.002 0.002 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_9 (cost=0.00..0.02 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

47. 0.012 0.012 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_10 (cost=0.00..0.02 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=1)

48. 0.006 0.006 ↑ 1.0 1 1

CTE Scan on get_event_created_min (cost=0.00..0.02 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=1)

49. 0.057 28.859 ↑ 597.5 4 1

Hash Left Join (cost=4,273.50..5,209.13 rows=2,390 width=127) (actual time=28.743..28.859 rows=4 loops=1)

  • Hash Cond: (device_ntfn.notification_uuid = device_response.notification_uuid)
50. 0.008 0.464 ↑ 597.5 4 1

Nested Loop (cost=2.97..926.64 rows=2,390 width=80) (actual time=0.351..0.464 rows=4 loops=1)

51. 0.028 0.316 ↑ 58.5 4 1

Nested Loop (cost=2.54..121.59 rows=234 width=24) (actual time=0.284..0.316 rows=4 loops=1)

52. 0.006 0.104 ↑ 1.0 1 1

HashAggregate (cost=0.02..0.03 rows=1 width=16) (actual time=0.104..0.104 rows=1 loops=1)

  • Group Key: get_event.event_uuid
53. 0.098 0.098 ↑ 1.0 1 1

CTE Scan on get_event (cost=0.00..0.02 rows=1 width=16) (actual time=0.096..0.098 rows=1 loops=1)

54. 0.006 0.184 ↓ 4.0 4 1

Append (cost=2.52..121.54 rows=1 width=40) (actual time=0.154..0.184 rows=4 loops=1)

55. 0.081 0.178 ↓ 4.0 4 1

Bitmap Heap Scan on notifications_summary_org_part_146 live_ntfn (cost=2.52..121.54 rows=1 width=40) (actual time=0.150..0.178 rows=4 loops=1)

  • Recheck Cond: (event_uuid = get_event.event_uuid)
  • Filter: ((created_date >= $19) AND (pending_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) AND (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (category = 'LIVE'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $18)))
  • Rows Removed by Filter: 35
  • Heap Blocks: exact=4
56. 0.097 0.097 ↑ 2.0 39 1

Bitmap Index Scan on notifications_summary_org_part_146_event_uuid_idx (cost=0.00..2.52 rows=79 width=0) (actual time=0.097..0.097 rows=39 loops=1)

  • Index Cond: (event_uuid = get_event.event_uuid)
57. 0.004 0.140 ↑ 1.0 1 4

Append (cost=0.43..3.43 rows=1 width=72) (actual time=0.035..0.035 rows=1 loops=4)

58. 0.136 0.136 ↑ 1.0 1 4

Index Scan using notifications_summary_org_part_146_pkey on notifications_summary_org_part_146 device_ntfn (cost=0.43..3.43 rows=1 width=72) (actual time=0.034..0.034 rows=1 loops=4)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (notification_uuid = live_ntfn.parent_ntfn_uuid))
  • Filter: ((created_date >= $15) AND (category = 'DEVICE'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $14)))
59. 1.136 28.338 ↓ 1.4 3,856 1

Hash (cost=4,235.26..4,235.26 rows=2,822 width=63) (actual time=28.337..28.338 rows=3,856 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 382kB
60. 15.671 27.202 ↓ 1.4 3,856 1

Bitmap Heap Scan on responses device_response (cost=94.05..4,235.26 rows=2,822 width=63) (actual time=11.786..27.202 rows=3,856 loops=1)

  • Recheck Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (valid_range @> '2019-09-26 16:38:28.488+00'::timestamp with time zone))
  • Filter: (is_visible IS TRUE)
  • Heap Blocks: exact=1,867
61. 11.531 11.531 ↓ 1.4 3,856 1

Bitmap Index Scan on responses_org_valid_range_gist (cost=0.00..93.35 rows=2,843 width=0) (actual time=11.531..11.531 rows=3,856 loops=1)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (valid_range @> '2019-09-26 16:38:28.488+00'::timestamp with time zone))
62. 0.004 0.132 ↑ 1.0 1 4

Append (cost=0.43..3.31 rows=1 width=72) (actual time=0.033..0.033 rows=1 loops=4)

63. 0.128 0.128 ↑ 1.0 1 4

Index Scan using notifications_summary_org_part_146_pkey on notifications_summary_org_part_146 person_ntfn (cost=0.43..3.31 rows=1 width=72) (actual time=0.031..0.032 rows=1 loops=4)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (notification_uuid = device_ntfn.parent_ntfn_uuid))
  • Filter: ((created_date >= $17) AND (category = 'PERSON'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $16)))
64. 0.004 0.311 ↑ 93.2 8 1

Nested Loop Left Join (cost=3.16..3,939.54 rows=746 width=327) (actual time=0.101..0.311 rows=8 loops=1)

65.          

Initplan (for Nested Loop Left Join)

66. 0.000 0.000 ↓ 0.0 0

CTE Scan on get_lowered_responses_pattern_array rc_5 (cost=0.00..0.02 rows=1 width=32) (never executed)

67. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_11 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

68. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_12 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

69. 0.004 0.065 ↑ 93.2 8 1

Nested Loop (cost=2.54..121.98 rows=746 width=96) (actual time=0.050..0.065 rows=8 loops=1)

70. 0.003 0.004 ↑ 1.0 1 1

HashAggregate (cost=0.02..0.03 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=1)

  • Group Key: get_event_1.event_uuid
71. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event get_event_1 (cost=0.00..0.02 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=1)

72. 0.007 0.057 ↓ 8.0 8 1

Append (cost=2.52..121.94 rows=1 width=96) (actual time=0.044..0.057 rows=8 loops=1)

73. 0.026 0.050 ↓ 8.0 8 1

Bitmap Heap Scan on notifications_summary_org_part_146 person_resp_ntfn (cost=2.52..121.93 rows=1 width=96) (actual time=0.037..0.050 rows=8 loops=1)

  • Recheck Cond: (event_uuid = get_event_1.event_uuid)
  • Filter: ((created_date >= $22) AND (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (category = 'PERSON'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $21)) AND ((failed_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) OR (delivered_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone) OR (responded_date <= '2019-09-26 16:38:28.488+00'::timestamp with time zone)))
  • Rows Removed by Filter: 31
  • Heap Blocks: exact=4
74. 0.024 0.024 ↑ 2.0 39 1

Bitmap Index Scan on notifications_summary_org_part_146_event_uuid_idx (cost=0.00..2.52 rows=79 width=0) (actual time=0.024..0.024 rows=39 loops=1)

  • Index Cond: (event_uuid = get_event_1.event_uuid)
75. 0.240 0.240 ↓ 0.0 0 8

Index Scan using responses_notification_uuid_idx on responses pr_1 (cost=0.56..5.10 rows=1 width=63) (actual time=0.030..0.030 rows=0 loops=8)

  • Index Cond: (notification_uuid = person_resp_ntfn.notification_uuid)
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2019-09-26 16:38:28.488+00'::timestamp with time zone) AND (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (((response)::text || ' '::text) ~~* ANY ($20)))
76.          

CTE get_teams

77. 0.038 0.326 ↑ 819.5 2 1

HashAggregate (cost=84,894.58..84,910.97 rows=1,639 width=56) (actual time=0.295..0.326 rows=2 loops=1)

  • Group Key: team_ntfn.notification_uuid, team_ntfn.parent_ntfn_uuid
78. 0.156 0.288 ↑ 5,463.0 3 1

HashAggregate (cost=84,361.93..84,525.82 rows=16,389 width=72) (actual time=0.184..0.288 rows=3 loops=1)

  • Group Key: n.person_ntfn_uuid, team_ntfn.notification_uuid, team_ntfn.parent_ntfn_uuid
79. 0.007 0.132 ↑ 54,629.3 3 1

GroupAggregate (cost=74,528.65..79,855.01 rows=163,888 width=128) (actual time=0.130..0.132 rows=3 loops=1)

  • Group Key: n.person_uuid, n.person_ntfn_uuid, team_ntfn.notification_uuid, team_ntfn.parent_ntfn_uuid
80.          

Initplan (for GroupAggregate)

81. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_13 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

82. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_14 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

83. 0.009 0.123 ↑ 32,777.6 5 1

Sort (cost=74,528.61..74,938.33 rows=163,888 width=96) (actual time=0.122..0.123 rows=5 loops=1)

  • Sort Key: n.person_uuid, n.person_ntfn_uuid, team_ntfn.notification_uuid, team_ntfn.parent_ntfn_uuid
  • Sort Method: quicksort Memory: 25kB
84. 0.003 0.114 ↑ 32,777.6 5 1

Nested Loop (cost=0.43..54,931.74 rows=163,888 width=96) (actual time=0.080..0.114 rows=5 loops=1)

85. 0.003 0.003 ↑ 1,869.6 12 1

CTE Scan on get_person_device_notifications n (cost=0.00..448.70 rows=22,435 width=80) (actual time=0.001..0.003 rows=12 loops=1)

86. 0.012 0.108 ↓ 0.0 0 12

Append (cost=0.43..2.42 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=12)

87. 0.096 0.096 ↓ 0.0 0 12

Index Scan using notifications_summary_org_part_146_pkey on notifications_summary_org_part_146 team_ntfn (cost=0.43..2.41 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=12)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (notification_uuid = n.team_uuid))
  • Filter: ((created_date >= $30) AND (category = 'TEAM'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $29)))
  • Rows Removed by Filter: 0
88.          

CTE get_team_groups

89. 0.007 0.173 ↑ 106,945.0 6 1

Recursive Union (cost=37.34..236,212.54 rows=641,670 width=74) (actual time=0.068..0.173 rows=6 loops=1)

90. 0.003 0.074 ↑ 365.0 2 1

Nested Loop (cost=37.34..708.89 rows=730 width=74) (actual time=0.066..0.074 rows=2 loops=1)

91.          

Initplan (for Nested Loop)

92. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_15 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.001 rows=1 loops=1)

93. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_16 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.001 rows=1 loops=1)

94. 0.005 0.037 ↑ 100.0 2 1

HashAggregate (cost=36.88..38.88 rows=200 width=16) (actual time=0.036..0.037 rows=2 loops=1)

  • Group Key: get_teams.team_ntfn_uuid
95. 0.032 0.032 ↑ 819.5 2 1

CTE Scan on get_teams (cost=0.00..32.78 rows=1,639 width=16) (actual time=0.001..0.032 rows=2 loops=1)

96. 0.002 0.032 ↑ 1.0 1 2

Append (cost=0.43..3.34 rows=1 width=54) (actual time=0.016..0.016 rows=1 loops=2)

97. 0.030 0.030 ↑ 1.0 1 2

Index Scan using notifications_summary_org_part_146_pkey on notifications_summary_org_part_146 team_ntfn_1 (cost=0.43..3.33 rows=1 width=54) (actual time=0.015..0.015 rows=1 loops=2)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (notification_uuid = get_teams.team_ntfn_uuid))
  • Filter: ((created_date >= $35) AND (category = 'TEAM'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $34)))
98. 0.010 0.092 ↑ 64,094.0 1 4

Nested Loop (cost=0.47..22,267.02 rows=64,094 width=74) (actual time=0.014..0.023 rows=1 loops=4)

99.          

Initplan (for Nested Loop)

100. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_17 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

101. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_18 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

102. 0.004 0.004 ↑ 3,650.0 2 4

WorkTable Scan on get_team_groups tg_1 (cost=0.00..146.00 rows=7,300 width=36) (actual time=0.001..0.001 rows=2 loops=4)

103. 0.000 0.078 ↑ 1.0 1 6

Append (cost=0.43..3.00 rows=1 width=54) (actual time=0.013..0.013 rows=1 loops=6)

104. 0.078 0.078 ↑ 1.0 1 6

Index Scan using notifications_summary_org_part_146_pkey on notifications_summary_org_part_146 n_1 (cost=0.43..2.99 rows=1 width=54) (actual time=0.013..0.013 rows=1 loops=6)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (notification_uuid = tg_1.parent_ntfn_uuid))
  • Filter: ((created_date >= $37) AND (category = ANY ('{TEAM,GROUP}'::text[])) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $36)))
  • Rows Removed by Filter: 0
105.          

CTE get_targeted_groups

106. 0.005 0.684 ↑ 24.0 1 1

Nested Loop (cost=14,776.80..14,891.68 rows=24 width=168) (actual time=0.682..0.684 rows=1 loops=1)

107.          

Initplan (for Nested Loop)

108. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_event_closing_max e_19 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

109. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on get_event_created_min e_20 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

110. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event_created_max e_21 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

111. 0.003 0.664 ↑ 16.0 1 1

Nested Loop Left Join (cost=14,776.31..14,835.88 rows=16 width=136) (actual time=0.664..0.664 rows=1 loops=1)

112. 0.009 0.562 ↑ 16.0 1 1

GroupAggregate (cost=14,775.75..14,778.24 rows=16 width=88) (actual time=0.562..0.562 rows=1 loops=1)

  • Group Key: team_group.notification_uuid, team_group.recipient_uuid
113. 0.008 0.553 ↑ 65.5 2 1

Sort (cost=14,775.75..14,776.08 rows=131 width=72) (actual time=0.552..0.553 rows=2 loops=1)

  • Sort Key: team_group.notification_uuid, team_group.recipient_uuid
  • Sort Method: quicksort Memory: 25kB
114. 0.025 0.545 ↑ 65.5 2 1

Hash Join (cost=14,728.86..14,771.15 rows=131 width=72) (actual time=0.543..0.545 rows=2 loops=1)

  • Hash Cond: (team.team_ntfn_uuid = team_group.root_uuid)
115. 0.298 0.298 ↑ 819.5 2 1

CTE Scan on get_teams team (cost=0.00..32.78 rows=1,639 width=40) (actual time=0.298..0.298 rows=2 loops=1)

116. 0.004 0.222 ↑ 8.0 2 1

Hash (cost=14,728.66..14,728.66 rows=16 width=48) (actual time=0.222..0.222 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
117. 0.003 0.218 ↑ 8.0 2 1

Subquery Scan on team_group (cost=14,624.40..14,728.66 rows=16 width=48) (actual time=0.215..0.218 rows=2 loops=1)

  • Filter: (team_group.""row"" = 1)
  • Rows Removed by Filter: 1
118. 0.019 0.215 ↑ 1,069.3 3 1

WindowAgg (cost=14,624.40..14,688.56 rows=3,208 width=60) (actual time=0.213..0.215 rows=3 loops=1)

119. 0.013 0.196 ↑ 1,069.3 3 1

Sort (cost=14,624.40..14,632.42 rows=3,208 width=52) (actual time=0.195..0.196 rows=3 loops=1)

  • Sort Key: tg_2.root_uuid, tg_2.group_level DESC
  • Sort Method: quicksort Memory: 25kB
120. 0.183 0.183 ↑ 1,069.3 3 1

CTE Scan on get_team_groups tg_2 (cost=0.00..14,437.57 rows=3,208 width=52) (actual time=0.130..0.183 rows=3 loops=1)

  • Filter: (category = 'GROUP'::text)
  • Rows Removed by Filter: 3
121. 0.099 0.099 ↑ 1.0 1 1

Index Scan using groups_org_seq_vrange_uidx on groups g (cost=0.56..3.58 rows=1 width=64) (actual time=0.098..0.099 rows=1 loops=1)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (group_uuid = team_group.recipient_uuid))
  • Filter: ((is_visible IS TRUE) AND (valid_range @> $43))
  • Rows Removed by Filter: 1
122. 0.001 0.014 ↑ 1.0 1 1

Append (cost=0.43..3.46 rows=1 width=40) (actual time=0.014..0.014 rows=1 loops=1)

123. 0.013 0.013 ↑ 1.0 1 1

Index Scan using notifications_summary_org_part_146_pkey on notifications_summary_org_part_146 gn (cost=0.43..3.46 rows=1 width=40) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (notification_uuid = team_group.notification_uuid))
  • Filter: ((created_date >= $42) AND (category = 'GROUP'::text) AND (created_date <= LEAST('2019-09-26 16:38:28.488+00'::timestamp with time zone, $41)))
124.          

CTE get_total_person_uuids

125. 0.013 0.031 ↑ 50.0 4 1

HashAggregate (cost=560.88..562.88 rows=200 width=24) (actual time=0.028..0.031 rows=4 loops=1)

  • Group Key: en.person_uuid
126. 0.018 0.018 ↑ 1,869.6 12 1

CTE Scan on get_person_device_notifications en (cost=0.00..448.70 rows=22,435 width=24) (actual time=0.001..0.018 rows=12 loops=1)

127.          

CTE get_total_person_count

128. 0.004 0.007 ↑ 1.0 1 1

Aggregate (cost=4.50..4.51 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

129. 0.003 0.003 ↑ 50.0 4 1

CTE Scan on get_total_person_uuids (cost=0.00..4.00 rows=200 width=0) (actual time=0.000..0.003 rows=4 loops=1)

130.          

CTE get_person_uuids

131. 0.002 0.048 ↑ 25.0 4 1

Limit (cost=11.64..11.89 rows=100 width=24) (actual time=0.048..0.048 rows=4 loops=1)

132. 0.011 0.046 ↑ 50.0 4 1

Sort (cost=11.64..12.14 rows=200 width=24) (actual time=0.046..0.046 rows=4 loops=1)

  • Sort Key: en_agg.delivered_date_min
  • Sort Method: quicksort Memory: 25kB
133. 0.035 0.035 ↑ 50.0 4 1

CTE Scan on get_total_person_uuids en_agg (cost=0.00..4.00 rows=200 width=24) (actual time=0.031..0.035 rows=4 loops=1)

134.          

CTE get_person_notifications

135. 0.008 81.612 ↑ 320.6 7 1

Subquery Scan on p (cost=563,339.24..1,800,031.61 rows=2,244 width=328) (actual time=81.421..81.612 rows=7 loops=1)

136. 0.237 81.604 ↑ 320.6 7 1

GroupAggregate (cost=563,339.24..1,799,958.68 rows=2,244 width=296) (actual time=81.415..81.604 rows=7 loops=1)

  • Group Key: get_person_device_notifications.person_uuid, get_person_device_notifications.person_ntfn_uuid, get_person_device_notifications.person_delinked_date, get_person_device_notifications.team_uuid, get_person_device_notifications.event_uuid, ((SubPlan 36)), get_person_device_notifications.person_response_received, get_person_device_notifications.person_response_recipient_type, get_person_device_notifications.person_responded_date, get_person_device_notifications.person_delivered_date, get_person_device_notifications.person_failed_date
137.          

Initplan (for GroupAggregate)

138. 0.007 0.007 ↑ 1.0 1 1

CTE Scan on get_event_created_max e_22 (cost=0.00..0.02 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

139. 0.037 81.336 ↑ 1,402.2 8 1

Sort (cost=563,339.22..563,367.26 rows=11,218 width=352) (actual time=81.335..81.336 rows=8 loops=1)

  • Sort Key: get_person_device_notifications.person_uuid, get_person_device_notifications.person_ntfn_uuid, get_person_device_notifications.person_delinked_date, get_person_device_notifications.team_uuid, get_person_device_notifications.event_uuid, ((SubPlan 36)), get_person_device_notifications.person_response_received, get_person_device_notifications.person_response_recipient_type, get_person_device_notifications.person_responded_date, get_person_device_notifications.person_delivered_date, get_person_device_notifications.person_failed_date
  • Sort Method: quicksort Memory: 26kB
140. 0.039 81.299 ↑ 1,402.2 8 1

Hash Left Join (cost=133.46..562,584.61 rows=11,218 width=352) (actual time=81.276..81.299 rows=8 loops=1)

  • Hash Cond: (get_person_device_notifications.device_uuid = d.recipient_uuid)
141. 0.035 30.026 ↑ 1,402.2 8 1

Hash Semi Join (cost=3.25..635.64 rows=11,218 width=304) (actual time=30.016..30.026 rows=8 loops=1)

  • Hash Cond: (get_person_device_notifications.person_uuid = get_person_uuids.person_uuid)
142. 29.935 29.935 ↑ 1,869.6 12 1

CTE Scan on get_person_device_notifications (cost=0.00..448.70 rows=22,435 width=304) (actual time=29.932..29.935 rows=12 loops=1)

143. 0.005 0.056 ↑ 33.3 3 1

Hash (cost=2.00..2.00 rows=100 width=16) (actual time=0.056..0.056 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
144. 0.051 0.051 ↑ 25.0 4 1

CTE Scan on get_person_uuids (cost=0.00..2.00 rows=100 width=16) (actual time=0.049..0.051 rows=4 loops=1)

145. 0.173 51.146 ↓ 40.2 523 1

Hash (cost=130.05..130.05 rows=13 width=64) (actual time=51.146..51.146 rows=523 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 53kB
146. 0.057 50.973 ↓ 40.2 523 1

Append (cost=108.97..130.05 rows=13 width=64) (actual time=49.314..50.973 rows=523 loops=1)

147. 1.664 50.916 ↓ 40.2 523 1

Bitmap Heap Scan on devices_org_part_default d (cost=108.97..129.99 rows=13 width=64) (actual time=49.313..50.916 rows=523 loops=1)

  • Recheck Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (valid_range @> $53))
  • Filter: (is_visible IS TRUE)
  • Heap Blocks: exact=195
148. 0.268 49.252 ↓ 0.0 0 1

BitmapAnd (cost=108.97..108.97 rows=14 width=0) (actual time=49.252..49.252 rows=0 loops=1)

149. 0.349 0.349 ↑ 1.0 2,817 1

Bitmap Index Scan on devices_org_part_default_pkey (cost=0.00..48.84 rows=2,855 width=0) (actual time=0.349..0.349 rows=2,817 loops=1)

  • Index Cond: (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid)
150. 48.635 48.635 ↓ 100.7 276,397 1

Bitmap Index Scan on devices_org_part_default_valid_range_idx (cost=0.00..59.87 rows=2,745 width=0) (actual time=48.635..48.635 rows=276,397 loops=1)

  • Index Cond: (valid_range @> $53)
151.          

SubPlan (for Hash Left Join)

152. 0.008 0.088 ↓ 0.0 0 8

Limit (cost=50.07..50.08 rows=1 width=36) (actual time=0.011..0.011 rows=0 loops=8)

153. 0.072 0.080 ↓ 0.0 0 8

Sort (cost=50.07..50.10 rows=10 width=36) (actual time=0.010..0.010 rows=0 loops=8)

  • Sort Key: (length(rm.response)) DESC
  • Sort Method: quicksort Memory: 25kB
154. 0.008 0.008 ↓ 0.0 0 8

CTE Scan on get_response_matchers rm (cost=0.00..50.02 rows=10 width=36) (actual time=0.001..0.001 rows=0 loops=8)

  • Filter: (((get_person_device_notifications.person_response)::text || ' '::text) ~~* response_pattern)
  • Rows Removed by Filter: 3
155.          

SubPlan (for GroupAggregate)

156. 0.008 0.024 ↓ 0.0 0 8

Limit (cost=50.07..50.08 rows=1 width=36) (actual time=0.003..0.003 rows=0 loops=8)

157. 0.008 0.016 ↓ 0.0 0 8

Sort (cost=50.07..50.10 rows=10 width=36) (actual time=0.002..0.002 rows=0 loops=8)

  • Sort Key: (length(rm_2.response)) DESC
  • Sort Method: quicksort Memory: 25kB
158. 0.008 0.008 ↓ 0.0 0 8

CTE Scan on get_response_matchers rm_2 (cost=0.00..50.02 rows=10 width=36) (actual time=0.001..0.001 rows=0 loops=8)

  • Filter: (((get_person_device_notifications.device_response)::text || ' '::text) ~~* response_pattern)
  • Rows Removed by Filter: 3
159. 0.000 0.000 ↓ 0.0 0

Limit (cost=50.07..50.08 rows=1 width=36) (never executed)

160. 0.000 0.000 ↓ 0.0 0

Sort (cost=50.07..50.10 rows=10 width=36) (never executed)

  • Sort Key: (length(rm_1.response)) DESC
161. 0.000 0.000 ↓ 0.0 0

CTE Scan on get_response_matchers rm_1 (cost=0.00..50.02 rows=10 width=36) (never executed)

  • Filter: (((get_person_device_notifications.device_response)::text || ' '::text) ~~* response_pattern)
162.          

Initplan (for Sort)

163. 0.009 0.009 ↑ 1.0 1 1

CTE Scan on get_total_person_count (cost=0.00..0.02 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

164. 0.002 0.003 ↑ 1.0 1 1

Limit (cost=0.00..0.02 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=1)

165. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event get_event_2 (cost=0.00..0.02 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=1)

166. 0.003 0.004 ↑ 1.0 1 1

Aggregate (cost=0.02..0.03 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

167. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on get_event e_23 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

168. 0.003 0.005 ↑ 1.0 1 1

Aggregate (cost=0.02..0.03 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1)

169. 0.002 0.002 ↑ 1.0 1 1

CTE Scan on get_event e_24 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=1)

170. 0.032 85.481 ↑ 74.7 3 1

Nested Loop Left Join (cost=578.55..91,836.36 rows=224 width=437) (actual time=84.997..85.481 rows=3 loops=1)

171. 0.033 85.143 ↑ 74.7 3 1

Hash Left Join (cost=528.49..80,611.62 rows=224 width=481) (actual time=84.759..85.143 rows=3 loops=1)

  • Hash Cond: (person.site_uuid = site.site_uuid)
172. 0.006 84.985 ↑ 74.7 3 1

Nested Loop Left Join (cost=525.17..80,607.46 rows=224 width=470) (actual time=84.603..84.985 rows=3 loops=1)

173. 0.007 82.762 ↑ 74.7 3 1

Nested Loop Left Join (cost=524.62..79,804.24 rows=224 width=264) (actual time=82.522..82.762 rows=3 loops=1)

174. 0.007 81.990 ↑ 74.7 3 1

Nested Loop Left Join (cost=524.07..79,674.88 rows=224 width=264) (actual time=81.824..81.990 rows=3 loops=1)

175. 0.008 81.962 ↑ 74.7 3 1

Nested Loop Left Join (cost=346.30..39,847.68 rows=224 width=264) (actual time=81.816..81.962 rows=3 loops=1)

176. 0.148 81.810 ↑ 74.7 3 1

GroupAggregate (cost=169.78..298.24 rows=224 width=280) (actual time=81.736..81.810 rows=3 loops=1)

  • Group Key: pn.person_uuid, pn.event_uuid
177. 0.035 81.662 ↑ 320.6 7 1

Sort (cost=169.78..175.39 rows=2,244 width=312) (actual time=81.661..81.662 rows=7 loops=1)

  • Sort Key: pn.person_uuid, pn.event_uuid
  • Sort Method: quicksort Memory: 27kB
178. 81.627 81.627 ↑ 320.6 7 1

CTE Scan on get_person_notifications pn (cost=0.00..44.88 rows=2,244 width=312) (actual time=81.426..81.627 rows=7 loops=1)

179. 0.111 0.144 ↑ 1.0 1 3

Aggregate (cost=176.52..176.53 rows=1 width=32) (actual time=0.048..0.048 rows=1 loops=3)

180. 0.012 0.033 ↑ 10,000.0 1 3

ProjectSet (cost=0.00..51.52 rows=10,000 width=32) (actual time=0.010..0.011 rows=1 loops=3)

181. 0.021 0.021 ↑ 100.0 1 3

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.006..0.007 rows=1 loops=3)

182. 0.000 0.000 ↑ 1.0 1 3

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=3)

183. 0.018 0.021 ↑ 1.0 1 3

Aggregate (cost=177.77..177.78 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=3)

184. 0.000 0.003 ↓ 0.0 0 3

ProjectSet (cost=0.00..52.77 rows=10,000 width=32) (actual time=0.001..0.001 rows=0 loops=3)

185. 0.003 0.003 ↓ 0.0 0 3

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.001..0.001 rows=0 loops=3)

186. 0.000 0.000 ↑ 1.0 1 3

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=3)

187. 0.069 0.765 ↑ 1.0 1 3

Aggregate (cost=0.55..0.56 rows=1 width=32) (actual time=0.255..0.255 rows=1 loops=3)

188. 0.696 0.696 ↑ 1.0 1 3

CTE Scan on get_targeted_groups tg (cost=0.00..0.54 rows=1 width=120) (actual time=0.232..0.232 rows=1 loops=3)

  • Filter: (team_ntfn_uuids && (array_agg(pn.team_uuid)))
  • Rows Removed by Filter: 0
189. 0.003 2.217 ↑ 1.0 1 3

Append (cost=0.56..3.58 rows=1 width=206) (actual time=0.726..0.739 rows=1 loops=3)

190. 2.214 2.214 ↑ 1.0 1 3

Index Scan using persons_org_part_default_organization_uuid_person_uuid_sequ_idx on persons_org_part_default person (cost=0.56..3.57 rows=1 width=206) (actual time=0.725..0.738 rows=1 loops=3)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (person_uuid = pn.person_uuid))
  • Filter: ((is_visible IS TRUE) AND (valid_range @> $57))
  • Rows Removed by Filter: 94
191. 0.006 0.125 ↑ 1.0 1 1

Hash (cost=3.30..3.30 rows=1 width=27) (actual time=0.124..0.125 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
192. 0.119 0.119 ↑ 1.0 1 1

Index Scan using sites_org_valid_range_gist on sites site (cost=0.28..3.30 rows=1 width=27) (actual time=0.099..0.119 rows=1 loops=1)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (valid_range @> $58))
  • Filter: (is_visible IS TRUE)
193. 0.039 0.306 ↑ 1.0 1 3

Aggregate (cost=50.07..50.08 rows=1 width=32) (actual time=0.102..0.102 rows=1 loops=3)

194. 0.018 0.267 ↑ 100.0 1 3

Nested Loop Left Join (cost=6.91..45.56 rows=100 width=58) (actual time=0.087..0.089 rows=1 loops=3)

195. 0.003 0.129 ↑ 1.0 1 3

Append (cost=0.42..3.45 rows=1 width=56) (actual time=0.042..0.043 rows=1 loops=3)

196. 0.126 0.126 ↑ 1.0 1 3

Index Scan using person_roles_org_part_default_organization_uuid_person_uuid_idx on person_roles_org_part_default pr (cost=0.42..3.45 rows=1 width=56) (actual time=0.041..0.042 rows=1 loops=3)

  • Index Cond: ((organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid) AND (person_uuid = person.person_uuid))
  • Filter: upper_inf(valid_range)
  • Rows Removed by Filter: 4
197. 0.024 0.120 ↓ 0.0 0 3

Hash Right Join (cost=6.49..41.11 rows=100 width=58) (actual time=0.039..0.040 rows=0 loops=3)

  • Hash Cond: (role.role_uuid = (((jsonb_array_elements_text(pr.roles)))::uuid))
198. 0.035 0.066 ↓ 3.2 26 1

Bitmap Heap Scan on roles role (cost=1.97..36.56 rows=8 width=58) (actual time=0.044..0.066 rows=26 loops=1)

  • Recheck Cond: (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid)
  • Filter: upper_inf(valid_range)
  • Heap Blocks: exact=3
199. 0.031 0.031 ↓ 1.1 26 1

Bitmap Index Scan on roles_organization_uuid_idx (cost=0.00..1.97 rows=24 width=0) (actual time=0.031..0.031 rows=26 loops=1)

  • Index Cond: (organization_uuid = 'c4544f42-9f53-42e7-add8-3b99b0042aef'::uuid)
200. 0.006 0.030 ↓ 0.0 0 3

Hash (cost=3.27..3.27 rows=100 width=16) (actual time=0.010..0.010 rows=0 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
201. 0.006 0.024 ↓ 0.0 0 3

Result (cost=0.00..2.27 rows=100 width=16) (actual time=0.007..0.008 rows=0 loops=3)

202. 0.018 0.018 ↓ 0.0 0 3

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.005..0.006 rows=0 loops=3)

203. 0.000 0.000 ↑ 1.0 1 3

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=3)

Planning time : 859.852 ms
Execution time : 91.373 ms