explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DXjO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0 0 1

Insert on recip_resp_stats (cost=81.11..196.74 rows=1 width=882) (actual rows=0 loops=1)

  • Buffers: shared hit=48,645,341 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
2. 0.000 0.000 ↓ 0.0 0 1

Subquery Scan on aggregated_data (cost=81.11..196.74 rows=1 width=882) (actual rows=0 loops=1)

  • Buffers: shared hit=48,645,341 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
3. 0.000 0.000 ↓ 0.0 0 1

GroupAggregate (cost=81.11..182.64 rows=1 width=166) (actual rows=0 loops=1)

  • Group Key: e.ev_id, (CASE WHEN ('DYNAMIC_TEAM'::text = ((SubPlan 5))::text) THEN ae.parent_ntfn_id WHEN (ae.parent_ntfn_id <> ae.root_ntfn_id) THEN (SubPlan 6) ELSE NULL::bigint END), r.recipient_id, (CASE WHEN ((r.recipient_cat)::text = 'GROUP'::text) THEN r.target_name WHEN ((r.recipient_cat)::text = 'PERSON'::text) THEN ((SubPlan 7))::character varying WHEN ((r.recipient_cat)::text = 'DYNAMIC_TEAM'::text) THEN r.target_name ELSE NULL::character varying END)
  • Buffers: shared hit=48,645,341 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
4. 0.000 0.000 ↓ 0.0 0 1

Sort (cost=81.11..81.12 rows=1 width=102) (actual rows=0 loops=1)

  • Sort Key: (CASE WHEN ('DYNAMIC_TEAM'::text = ((SubPlan 5))::text) THEN ae.parent_ntfn_id WHEN (ae.parent_ntfn_id <> ae.root_ntfn_id) THEN (SubPlan 6) ELSE NULL::bigint END), r.recipient_id, (CASE WHEN ((r.recipient_cat)::text = 'GROUP'::text) THEN r.target_name WHEN ((r.recipient_cat)::text = 'PERSON'::text) THEN ((SubPlan 7))::character varying WHEN ((r.recipient_cat)::text = 'DYNAMIC_TEAM'::text) THEN r.target_name ELSE NULL::character varying END)
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=48,645,341 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
5. 0.000 0.000 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.19..81.10 rows=1 width=102) (actual rows=0 loops=1)

  • Buffers: shared hit=48,645,338 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
6. 0.000 0.000 ↓ 0.0 0 1

Nested Loop (cost=1.91..63.44 rows=1 width=76) (actual rows=0 loops=1)

  • Buffers: shared hit=48,645,338 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
7. 0.000 0.000 ↓ 0.0 0 1

Nested Loop (cost=1.49..35.28 rows=1 width=56) (actual rows=0 loops=1)

  • Buffers: shared hit=48,645,338 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
8. 0.000 0.000 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.06..31.83 rows=1 width=48) (actual rows=0 loops=1)

  • Filter: (n.sub_id IS NULL)
  • Buffers: shared hit=48,645,338 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
9. 0.000 0.000 ↓ 0.0 0 1

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae (cost=0.50..28.24 rows=1 width=48) (actual rows=0 loops=1)

  • Filter: ((ev_id = '26575738087'::bigint) AND ((param_3)::text = 'Y'::text) AND ((ap_audit_ev_type)::text = ANY ('{PERSON_NOTIFICATION_CREATED,GROUP_NOTIFICATION_CREATED,TEAM_NOTIFICATION_CREATED}'::text[])) AND ((NOT (alternatives: SubPlan 26 or hashed SubPlan 31)) OR (alternatives: SubPlan 36 or hashed SubPlan 41)))
  • Rows Removed by Filter: 74,892,885
  • Buffers: shared hit=48,645,338 read=2,617,085 dirtied=102,689 written=5,250
  • I/O Timings: read=16,587.382 write=3,308.875
10.          

SubPlan (for Index Scan)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae2_6 (cost=0.50..10.59 rows=1 width=0) (never executed)

  • Index Cond: ((ntfn_id = ae.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
  • Filter: (((ap_audit_msg)::text = 'FAILED'::text) AND ((audit_ev_id = (SubPlan 23)) OR (audit_ev_id = (SubPlan 25))))
12.          

SubPlan (for Index Scan)

13. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

14.          

Initplan (for Result)

15. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using audit_evs_all_pk on audit_evs_all ae3_2 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae2_6.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
17. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

18.          

Initplan (for Result)

19. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae3_3 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae2_6.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
21. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae2_7 (cost=0.50..10.59 rows=1 width=8) (never executed)

  • Index Cond: ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text)
  • Filter: (((ap_audit_msg)::text = 'FAILED'::text) AND ((audit_ev_id = (SubPlan 28)) OR (audit_ev_id = (SubPlan 30))))
22.          

SubPlan (for Index Scan)

23. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

24.          

Initplan (for Result)

25. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using audit_evs_all_pk on audit_evs_all ae3_4 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae2_7.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
27. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

28.          

Initplan (for Result)

29. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae3_5 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae2_7.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
31. 0.000 0.000 ↓ 0.0 0

Nested Loop Anti Join (cost=1.00..14.12 rows=1 width=0) (never executed)

  • Join Filter: (ae3_6.ntfn_id = ae2_8.ntfn_id)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae2_8 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Filter: (parent_ntfn_id = ae.ntfn_id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae3_6 (cost=0.50..10.59 rows=1 width=8) (never executed)

  • Index Cond: ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text)
  • Filter: (((ap_audit_msg)::text = 'FAILED'::text) AND ((audit_ev_id = (SubPlan 33)) OR (audit_ev_id = (SubPlan 35))))
34.          

SubPlan (for Index Scan)

35. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

36.          

Initplan (for Result)

37. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

38. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using audit_evs_all_pk on audit_evs_all ae4 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae3_6.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
39. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

40.          

Initplan (for Result)

41. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae4_1 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae3_6.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
43. 0.000 0.000 ↓ 0.0 0

Nested Loop Anti Join (cost=1.00..14.12 rows=1 width=8) (never executed)

  • Join Filter: (ae3_7.ntfn_id = ae2_9.ntfn_id)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae2_9 (cost=0.50..3.51 rows=1 width=16) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all ae3_7 (cost=0.50..10.59 rows=1 width=8) (never executed)

  • Index Cond: ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text)
  • Filter: (((ap_audit_msg)::text = 'FAILED'::text) AND ((audit_ev_id = (SubPlan 38)) OR (audit_ev_id = (SubPlan 40))))
46.          

SubPlan (for Index Scan)

47. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

48.          

Initplan (for Result)

49. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using audit_evs_all_pk on audit_evs_all ae4_2 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae3_7.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
51. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

52.          

Initplan (for Result)

53. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

54. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae4_3 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: ((ntfn_id = ae3_7.ntfn_id) AND ((ap_audit_ev_type)::text = 'DELIVERY_STATE_CHANGED'::text))
55. 0.000 0.000 ↓ 0.0 0

Index Scan using ntfn_pk on ntfn n (cost=0.56..3.58 rows=1 width=16) (never executed)

  • Index Cond: (ntfn_id = ae.ntfn_id)
56. 0.000 0.000 ↓ 0.0 0

Index Scan using evs_ev_id_message_panel_id_idx on evs e (cost=0.42..3.44 rows=1 width=16) (never executed)

  • Index Cond: (ev_id = '26575738087'::bigint)
57. 0.000 0.000 ↓ 0.0 0

Index Scan using recipients_pk on recipients r (cost=0.42..28.15 rows=1 width=28) (never executed)

  • Index Cond: (recipient_id = ae.ntfn_recipient_id)
  • Filter: (((recipient_cat)::text = ANY ('{GROUP,PERSON,DYNAMIC_TEAM}'::text[])) AND ((NOT (alternatives: SubPlan 26 or hashed SubPlan 31)) OR (((recipient_cat)::text = 'DYNAMIC_TEAM'::text) AND (alternatives: SubPlan 36 or hashed SubPlan 41))))
58. 0.000 0.000 ↓ 0.0 0

Index Scan using web_creds_pk on web_creds wc (cost=0.29..0.32 rows=1 width=17) (never executed)

  • Index Cond: (web_cred_id = r.recipient_id)
59.          

SubPlan (for Nested Loop Left Join)

60. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.92..6.96 rows=1 width=6) (never executed)

61. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.92..6.96 rows=1 width=6) (never executed)

62. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all parent (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = ae.parent_ntfn_id)
  • Filter: ((ap_audit_ev_type)::text = ANY ('{PERSON_NOTIFICATION_CREATED,GROUP_NOTIFICATION_CREATED,TEAM_NOTIFICATION_CREATED}'::text[]))
63. 0.000 0.000 ↓ 0.0 0

Index Scan using recipients_pk on recipients r2 (cost=0.42..3.44 rows=1 width=14) (never executed)

  • Index Cond: (recipient_id = parent.ntfn_recipient_id)
64. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.00..7.05 rows=1 width=8) (never executed)

65. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.00..7.05 rows=1 width=8) (never executed)

  • Join Filter: (tm.parent_ntfn_id = grp.ntfn_id)
66. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Filter: ((ntfn_id = ae.parent_ntfn_id) AND ((ap_audit_ev_type)::text = 'TEAM_NOTIFICATION_CREATED'::text))
67. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ap_audit_ev_type = 'GROUP_NOTIFICATION_CREATED'::text)
  • Heap Fetches: 0
68. 0.000 0.000 ↓ 0.0 0

Index Scan using persons_person_id_upper_first_name_upper_last_name_fbi on persons (cost=0.29..3.32 rows=1 width=32) (never executed)

  • Index Cond: (person_id = r.recipient_id)
69.          

SubPlan (for GroupAggregate)

70. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=29.51..38.61 rows=1 width=0) (never executed)

  • Join Filter: (tm_3.parent_ntfn_id = grp_3.ntfn_id)
  • Filter: ((ae2_4.parent_ntfn_id = ae2_4.root_ntfn_id) OR (ae2_4.parent_ntfn_id = CASE WHEN ('DYNAMIC_TEAM'::text = ($15)::text) THEN ae.parent_ntfn_id WHEN (ae.parent_ntfn_id <> ae.root_ntfn_id) THEN $16 ELSE NULL::bigint END) OR (grp_3.ntfn_id = CASE WHEN ('DYNAMIC_TEAM'::text = ($18)::text) THEN ae.parent_ntfn_id WHEN (ae.parent_ntfn_id <> ae.root_ntfn_id) THEN $19 ELSE NULL::bigint END))
71.          

Initplan (for Nested Loop Left Join)

72. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.92..6.96 rows=1 width=6) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.92..6.96 rows=1 width=6) (never executed)

74. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all parent_1 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = ae.parent_ntfn_id)
  • Filter: ((ap_audit_ev_type)::text = ANY ('{PERSON_NOTIFICATION_CREATED,GROUP_NOTIFICATION_CREATED,TEAM_NOTIFICATION_CREATED}'::text[]))
75. 0.000 0.000 ↓ 0.0 0

Index Scan using recipients_pk on recipients r2_1 (cost=0.42..3.44 rows=1 width=14) (never executed)

  • Index Cond: (recipient_id = parent_1.ntfn_recipient_id)
76. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.00..7.05 rows=1 width=8) (never executed)

77. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.00..7.05 rows=1 width=8) (never executed)

  • Join Filter: (tm_1.parent_ntfn_id = grp_1.ntfn_id)
78. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm_1 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Filter: ((ntfn_id = ae.parent_ntfn_id) AND ((ap_audit_ev_type)::text = 'TEAM_NOTIFICATION_CREATED'::text))
79. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp_1 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ap_audit_ev_type = 'GROUP_NOTIFICATION_CREATED'::text)
  • Heap Fetches: 0
80. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.92..6.96 rows=1 width=6) (never executed)

81. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.92..6.96 rows=1 width=6) (never executed)

82. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all parent_2 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = ae.parent_ntfn_id)
  • Filter: ((ap_audit_ev_type)::text = ANY ('{PERSON_NOTIFICATION_CREATED,GROUP_NOTIFICATION_CREATED,TEAM_NOTIFICATION_CREATED}'::text[]))
83. 0.000 0.000 ↓ 0.0 0

Index Scan using recipients_pk on recipients r2_2 (cost=0.42..3.44 rows=1 width=14) (never executed)

  • Index Cond: (recipient_id = parent_2.ntfn_recipient_id)
84. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.00..7.05 rows=1 width=8) (never executed)

85. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.00..7.05 rows=1 width=8) (never executed)

  • Join Filter: (tm_2.parent_ntfn_id = grp_2.ntfn_id)
86. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm_2 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Filter: ((ntfn_id = ae.parent_ntfn_id) AND ((ap_audit_ev_type)::text = 'TEAM_NOTIFICATION_CREATED'::text))
87. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp_2 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ap_audit_ev_type = 'GROUP_NOTIFICATION_CREATED'::text)
  • Heap Fetches: 0
88. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.00..7.05 rows=1 width=24) (never executed)

  • Join Filter: (ae2_4.parent_ntfn_id = tm_3.ntfn_id)
89. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all ae2_4 (cost=0.50..3.52 rows=1 width=16) (never executed)

  • Filter: ((ntfn_recipient_id = r.recipient_id) AND (ev_id = e.ev_id) AND ((ap_audit_ev_type)::text = 'NOTIFICATION_PEER_ESCALATION'::text))
90. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm_3 (cost=0.50..3.51 rows=1 width=16) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp_3 (cost=0.50..3.51 rows=1 width=8) (never executed)

  • Heap Fetches: 0
92. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=29.39..38.48 rows=1 width=0) (never executed)

  • Join Filter: (tm_6.parent_ntfn_id = grp_6.ntfn_id)
  • Filter: ((ae2_5.parent_ntfn_id = ae2_5.root_ntfn_id) OR (ae2_5.parent_ntfn_id = CASE WHEN ('DYNAMIC_TEAM'::text = ($25)::text) THEN ae.parent_ntfn_id WHEN (ae.parent_ntfn_id <> ae.root_ntfn_id) THEN $26 ELSE NULL::bigint END) OR (grp_6.ntfn_id = CASE WHEN ('DYNAMIC_TEAM'::text = ($28)::text) THEN ae.parent_ntfn_id WHEN (ae.parent_ntfn_id <> ae.root_ntfn_id) THEN $29 ELSE NULL::bigint END))
93.          

Initplan (for Nested Loop Left Join)

94. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.92..6.96 rows=1 width=6) (never executed)

95. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.92..6.96 rows=1 width=6) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all parent_3 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = ae.parent_ntfn_id)
  • Filter: ((ap_audit_ev_type)::text = ANY ('{PERSON_NOTIFICATION_CREATED,GROUP_NOTIFICATION_CREATED,TEAM_NOTIFICATION_CREATED}'::text[]))
97. 0.000 0.000 ↓ 0.0 0

Index Scan using recipients_pk on recipients r2_3 (cost=0.42..3.44 rows=1 width=14) (never executed)

  • Index Cond: (recipient_id = parent_3.ntfn_recipient_id)
98. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.00..7.05 rows=1 width=8) (never executed)

99. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.00..7.05 rows=1 width=8) (never executed)

  • Join Filter: (tm_4.parent_ntfn_id = grp_4.ntfn_id)
100. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm_4 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Filter: ((ntfn_id = ae.parent_ntfn_id) AND ((ap_audit_ev_type)::text = 'TEAM_NOTIFICATION_CREATED'::text))
101. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp_4 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ap_audit_ev_type = 'GROUP_NOTIFICATION_CREATED'::text)
  • Heap Fetches: 0
102. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.92..6.96 rows=1 width=6) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.92..6.96 rows=1 width=6) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all parent_4 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = ae.parent_ntfn_id)
  • Filter: ((ap_audit_ev_type)::text = ANY ('{PERSON_NOTIFICATION_CREATED,GROUP_NOTIFICATION_CREATED,TEAM_NOTIFICATION_CREATED}'::text[]))
105. 0.000 0.000 ↓ 0.0 0

Index Scan using recipients_pk on recipients r2_4 (cost=0.42..3.44 rows=1 width=14) (never executed)

  • Index Cond: (recipient_id = parent_4.ntfn_recipient_id)
106. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.00..7.05 rows=1 width=8) (never executed)

107. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.00..7.05 rows=1 width=8) (never executed)

  • Join Filter: (tm_5.parent_ntfn_id = grp_5.ntfn_id)
108. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm_5 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Filter: ((ntfn_id = ae.parent_ntfn_id) AND ((ap_audit_ev_type)::text = 'TEAM_NOTIFICATION_CREATED'::text))
109. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp_5 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (ap_audit_ev_type = 'GROUP_NOTIFICATION_CREATED'::text)
  • Heap Fetches: 0
110. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.88..6.92 rows=1 width=24) (never executed)

  • Join Filter: (ae2_5.parent_ntfn_id = tm_6.ntfn_id)
111. 0.000 0.000 ↓ 0.0 0

Index Scan using aea_ev_id_nri_ei_pidx on audit_evs_all ae2_5 (cost=0.38..3.39 rows=1 width=16) (never executed)

  • Index Cond: ((ntfn_recipient_id = r.recipient_id) AND (ev_id = e.ev_id))
112. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_audit_evs_all_parent on audit_evs_all tm_6 (cost=0.50..3.51 rows=1 width=16) (never executed)

113. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all grp_6 (cost=0.50..3.51 rows=1 width=8) (never executed)

  • Heap Fetches: 0
114. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

115.          

Initplan (for Result)

116. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

117. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae3_1 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: (((ap_audit_ev_type)::text = 'NOTIFICATION_RECEIVED_RESPONSE'::text) AND (ntfn_id = ae.ntfn_id))
118. 0.000 0.000 ↓ 0.0 0

Result (cost=3.52..3.53 rows=1 width=8) (never executed)

119.          

Initplan (for Result)

120. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.50..3.52 rows=1 width=8) (never executed)

121. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using audit_evs_all_pk on audit_evs_all ae3 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id IS NOT NULL)
  • Filter: (((ap_audit_ev_type)::text = 'NOTIFICATION_RECEIVED_RESPONSE'::text) AND (ntfn_id = ae.ntfn_id))
122.          

SubPlan (for Subquery Scan)

123. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae2 (cost=0.50..3.52 rows=1 width=32) (never executed)

  • Index Cond: (audit_ev_id = aggregated_data.response_audit_id)
124. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae2_1 (cost=0.50..3.52 rows=1 width=32) (never executed)

  • Index Cond: (audit_ev_id = aggregated_data.response_audit_id)
125. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae2_2 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id = aggregated_data.response_audit_id)
126. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_pk on audit_evs_all ae2_3 (cost=0.50..3.52 rows=1 width=8) (never executed)

  • Index Cond: (audit_ev_id = aggregated_data.first_response_audit_id)