explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RUsx

Settings
# exclusive inclusive rows x rows loops node
1. 2.433 488.425 ↑ 1.0 1 1

Result (cost=120,295.72..120,295.73 rows=1 width=32) (actual time=488.424..488.425 rows=1 loops=1)

2.          

CTE matches

3. 0.012 0.124 ↓ 3.4 24 1

Nested Loop (cost=6.12..17.80 rows=7 width=46) (actual time=0.088..0.124 rows=24 loops=1)

  • Join Filter: (media.id = media_1.id)
4. 0.016 0.088 ↓ 3.4 24 1

Hash Join (cost=5.97..14.52 rows=7 width=62) (actual time=0.078..0.088 rows=24 loops=1)

  • Hash Cond: (user_media_offline.media_id = media.id)
5. 0.020 0.020 ↑ 1.0 27 1

Index Only Scan using user_media_offline_pkey on user_media_offline (cost=0.28..8.75 rows=27 width=16) (actual time=0.017..0.020 rows=27 loops=1)

  • Index Cond: (user_id = '3b634574-260d-4d74-880d-075c1be5a8cf'::uuid)
  • Heap Fetches: 0
6. 0.012 0.052 ↓ 2.0 46 1

Hash (cost=5.41..5.41 rows=23 width=46) (actual time=0.052..0.052 rows=46 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
7. 0.040 0.040 ↓ 2.0 46 1

Seq Scan on media (cost=0.00..5.41 rows=23 width=46) (actual time=0.005..0.040 rows=46 loops=1)

  • Filter: ((state = 'ACTIVE'::text) AND (lifecycle_status = 'ACTIVE'::text))
  • Rows Removed by Filter: 48
8. 0.024 0.024 ↑ 1.0 1 24

Index Only Scan using media_pkey on media media_1 (cost=0.14..0.46 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=24)

  • Index Cond: (id = user_media_offline.media_id)
  • Heap Fetches: 0
9.          

CTE view

10. 0.040 0.172 ↓ 3.4 24 1

Sort (cost=0.24..0.26 rows=7 width=48) (actual time=0.164..0.172 rows=24 loops=1)

  • Sort Key: matches.name, matches.id
  • Sort Method: quicksort Memory: 27kB
11. 0.132 0.132 ↓ 3.4 24 1

CTE Scan on matches (cost=0.00..0.14 rows=7 width=48) (actual time=0.089..0.132 rows=24 loops=1)

12.          

Initplan (forResult)

13. 132.482 485.992 ↑ 1.0 1 1

Aggregate (cost=120,277.66..120,277.67 rows=1 width=32) (actual time=485.991..485.992 rows=1 loops=1)

14. 0.018 353.510 ↓ 3.4 24 1

Nested Loop Left Join (cost=17,176.80..120,277.64 rows=7 width=80) (actual time=42.943..353.510 rows=24 loops=1)

15. 0.188 0.188 ↓ 3.4 24 1

CTE Scan on view (cost=0.00..0.14 rows=7 width=48) (actual time=0.165..0.188 rows=24 loops=1)

16. 6.480 353.304 ↑ 1.0 1 24

Nested Loop Left Join (cost=17,176.80..17,182.49 rows=1 width=48) (actual time=14.716..14.721 rows=1 loops=24)

17. 4.680 346.824 ↑ 1.0 1 24

Nested Loop Left Join (cost=17,106.12..17,111.28 rows=1 width=406) (actual time=14.447..14.451 rows=1 loops=24)

18. 0.024 342.144 ↑ 1.0 1 24

Nested Loop Left Join (cost=16,895.91..16,901.03 rows=1 width=374) (actual time=14.253..14.256 rows=1 loops=24)

19. 0.072 336.480 ↑ 1.0 1 24

Nested Loop Left Join (cost=16,629.29..16,634.39 rows=1 width=342) (actual time=14.016..14.020 rows=1 loops=24)

20. 0.048 38.616 ↑ 1.0 1 24

Nested Loop Left Join (cost=1,855.05..1,860.12 rows=1 width=310) (actual time=1.607..1.609 rows=1 loops=24)

21. 0.024 1.008 ↑ 1.0 1 24

Nested Loop Left Join (cost=6.66..11.70 rows=1 width=278) (actual time=0.040..0.042 rows=1 loops=24)

22. 0.048 0.456 ↑ 1.0 1 24

Nested Loop Left Join (cost=0.85..5.86 rows=1 width=258) (actual time=0.017..0.019 rows=1 loops=24)

23. 0.048 0.312 ↑ 1.0 1 24

Nested Loop Left Join (cost=0.57..4.33 rows=1 width=238) (actual time=0.011..0.013 rows=1 loops=24)

24. 0.024 0.240 ↑ 1.0 1 24

Nested Loop Left Join (cost=0.43..4.09 rows=1 width=222) (actual time=0.009..0.010 rows=1 loops=24)

25. 0.048 0.192 ↑ 1.0 1 24

Nested Loop (cost=0.29..3.84 rows=1 width=190) (actual time=0.007..0.008 rows=1 loops=24)

26. 0.120 0.120 ↑ 1.0 1 24

Index Scan using media_pkey on media vm (cost=0.14..3.59 rows=1 width=174) (actual time=0.004..0.005 rows=1 loops=24)

  • Index Cond: (id = view.id)
  • Filter: (state <> 'DELETED'::text)
27. 0.024 0.024 ↑ 1.0 1 24

Index Only Scan using media_pkey on media media_2 (cost=0.14..0.25 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=24)

  • Index Cond: (id = vm.id)
  • Heap Fetches: 0
28. 0.024 0.024 ↑ 1.0 1 24

Index Only Scan using media_pkey on media media_3 (cost=0.14..0.25 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=24)

  • Index Cond: (id = media_2.id)
  • Heap Fetches: 0
29. 0.024 0.024 ↑ 1.0 1 24

Index Only Scan using media_pkey on media media_4 (cost=0.14..0.25 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=24)

  • Index Cond: (id = media_2.id)
  • Heap Fetches: 0
30. 0.096 0.096 ↑ 1.0 1 24

Index Scan using user_media_offline_pkey on user_media_offline user_media_offline_1 (cost=0.28..1.45 rows=1 width=20) (actual time=0.004..0.004 rows=1 loops=24)

  • Index Cond: ((user_id = '3b634574-260d-4d74-880d-075c1be5a8cf'::uuid) AND (media_id = vm.id))
31. 0.024 0.528 ↑ 1.0 1 24

Limit (cost=5.81..5.81 rows=1 width=52) (actual time=0.021..0.022 rows=1 loops=24)

32. 0.120 0.504 ↑ 2.0 1 24

Sort (cost=5.81..5.81 rows=2 width=52) (actual time=0.020..0.021 rows=1 loops=24)

  • Sort Key: media_version.version DESC
  • Sort Method: quicksort Memory: 25kB
33. 0.384 0.384 ↑ 1.0 2 24

Seq Scan on media_version (cost=0.00..5.80 rows=2 width=52) (actual time=0.006..0.016 rows=2 loops=24)

  • Filter: (media_id = vm.id)
  • Rows Removed by Filter: 142
34. 0.312 37.560 ↑ 1.0 1 24

Aggregate (cost=1,848.39..1,848.40 rows=1 width=32) (actual time=1.565..1.565 rows=1 loops=24)

35. 0.090 37.248 ↑ 1.5 2 24

Nested Loop Left Join (cost=615.34..1,848.38 rows=3 width=51) (actual time=0.773..1.552 rows=2 loops=24)

36. 0.144 0.336 ↑ 1.5 2 24

Hash Join (cost=4.36..5.61 rows=3 width=35) (actual time=0.011..0.014 rows=2 loops=24)

  • Hash Cond: (topic.id = media_topic.topic_id)
37. 0.072 0.072 ↑ 1.0 16 24

Seq Scan on topic (cost=0.00..1.20 rows=16 width=35) (actual time=0.001..0.003 rows=16 loops=24)

  • Filter: (state <> 'DELETED'::text)
38. 0.048 0.120 ↑ 1.5 2 24

Hash (cost=4.32..4.32 rows=3 width=16) (actual time=0.005..0.005 rows=2 loops=24)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
39. 0.072 0.072 ↑ 1.5 2 24

Index Only Scan using media_topic_pkey on media_topic (cost=0.27..4.32 rows=3 width=16) (actual time=0.003..0.003 rows=2 loops=24)

  • Index Cond: (media_id = vm.id)
  • Heap Fetches: 0
40. 0.204 36.822 ↑ 1.0 1 51

Nested Loop Left Join (cost=610.98..614.25 rows=1 width=48) (actual time=0.722..0.722 rows=1 loops=51)

41. 0.102 0.102 ↑ 1.0 1 51

Index Scan using topic_pkey on topic t (cost=0.14..0.90 rows=1 width=47) (actual time=0.002..0.002 rows=1 loops=51)

  • Index Cond: (id = topic.id)
  • Filter: (state <> 'DELETED'::text)
42. 1.224 36.108 ↑ 1.0 1 51

Aggregate (cost=610.85..610.86 rows=1 width=32) (actual time=0.708..0.708 rows=1 loops=51)

43. 0.765 34.884 ↓ 1.7 12 51

Nested Loop (cost=83.06..610.83 rows=7 width=52) (actual time=0.065..0.684 rows=12 loops=51)

  • Join Filter: (activity_type.id = activity_type_1.id)
  • Rows Removed by Join Filter: 66
44. 0.153 34.119 ↓ 1.7 12 51

Nested Loop Left Join (cost=83.06..608.47 rows=7 width=84) (actual time=0.064..0.669 rows=12 loops=51)

45. 0.344 0.918 ↓ 1.7 12 51

Hash Join (cost=1.31..3.94 rows=7 width=52) (actual time=0.005..0.018 rows=12 loops=51)

  • Hash Cond: (topic_activity_type.activity_type_id = activity_type.id)
46. 0.561 0.561 ↓ 1.5 12 51

Seq Scan on topic_activity_type (cost=0.00..2.60 rows=8 width=16) (actual time=0.003..0.011 rows=12 loops=51)

  • Filter: (topic_id = t.id)
  • Rows Removed by Filter: 116
47. 0.005 0.013 ↓ 1.1 13 1

Hash (cost=1.16..1.16 rows=12 width=36) (actual time=0.013..0.013 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
48. 0.008 0.008 ↓ 1.1 13 1

Seq Scan on activity_type (cost=0.00..1.16 rows=12 width=36) (actual time=0.005..0.008 rows=13 loops=1)

  • Filter: (state <> 'DELETED'::text)
49. 1.224 33.048 ↑ 1.0 1 612

Nested Loop Left Join (cost=81.75..86.35 rows=1 width=48) (actual time=0.050..0.054 rows=1 loops=612)

50. 0.612 29.988 ↑ 1.0 1 612

Nested Loop Left Join (cost=48.46..53.02 rows=1 width=269) (actual time=0.046..0.049 rows=1 loops=612)

51. 0.612 16.524 ↑ 1.0 1 612

Nested Loop Left Join (cost=19.04..23.58 rows=1 width=237) (actual time=0.024..0.027 rows=1 loops=612)

52. 0.612 14.076 ↑ 1.0 1 612

Nested Loop Left Join (cost=9.53..14.03 rows=1 width=205) (actual time=0.020..0.023 rows=1 loops=612)

53. 0.612 7.956 ↑ 1.0 1 612

Nested Loop Left Join (cost=7.87..12.35 rows=1 width=173) (actual time=0.011..0.013 rows=1 loops=612)

  • Join Filter: (touch_point_group.id = touch_point_group_1.id)
  • Rows Removed by Join Filter: 4
54. 0.612 5.508 ↑ 1.0 1 612

Nested Loop Left Join (cost=0.54..4.85 rows=1 width=157) (actual time=0.009..0.009 rows=1 loops=612)

  • Join Filter: (touch_point_group.id = at.touch_point_group_id)
  • Rows Removed by Join Filter: 2
55. 0.000 4.284 ↑ 1.0 1 612

Nested Loop Left Join (cost=0.54..3.73 rows=1 width=157) (actual time=0.007..0.007 rows=1 loops=612)

56. 0.612 3.672 ↑ 1.0 1 612

Nested Loop Left Join (cost=0.41..2.87 rows=1 width=141) (actual time=0.005..0.006 rows=1 loops=612)

57. 0.612 2.448 ↑ 1.0 1 612

Nested Loop (cost=0.27..2.01 rows=1 width=109) (actual time=0.003..0.004 rows=1 loops=612)

58. 1.224 1.224 ↑ 1.0 1 612

Index Scan using activity_type_pkey on activity_type at (cost=0.14..1.15 rows=1 width=93) (actual time=0.001..0.002 rows=1 loops=612)

  • Index Cond: (id = activity_type.id)
59. 0.612 0.612 ↑ 1.0 1 612

Index Only Scan using activity_type_pkey on activity_type activity_type_2 (cost=0.14..0.77 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=612)

  • Index Cond: (id = at.id)
  • Heap Fetches: 612
60. 0.612 0.612 ↑ 1.0 1 612

Index Only Scan using activity_type_pkey on activity_type activity_type_3 (cost=0.14..0.77 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=612)

  • Index Cond: (id = activity_type_2.id)
  • Heap Fetches: 612
61. 0.612 0.612 ↑ 1.0 1 612

Index Only Scan using activity_type_pkey on activity_type activity_type_4 (cost=0.14..0.77 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=612)

  • Index Cond: (id = activity_type_2.id)
  • Heap Fetches: 612
62. 0.612 0.612 ↑ 2.5 2 612

Seq Scan on touch_point_group (cost=0.00..1.06 rows=5 width=16) (actual time=0.001..0.001 rows=2 loops=612)

  • Filter: (state <> 'DELETED'::text)
63. 1.224 1.836 ↑ 1.0 5 612

Group (cost=7.33..7.38 rows=5 width=52) (actual time=0.001..0.003 rows=5 loops=612)

  • Group Key: touch_point_group_1.id, (array_length(COALESCE(array_agg(activity_type_5.id), '{}'::uuid[]), 1))
64. 0.583 0.612 ↑ 1.0 5 612

Sort (cost=7.33..7.35 rows=5 width=34) (actual time=0.000..0.001 rows=5 loops=612)

  • Sort Key: touch_point_group_1.id, (array_length(COALESCE(array_agg(activity_type_5.id), '{}'::uuid[]), 1))
  • Sort Method: quicksort Memory: 25kB
65. 0.002 0.029 ↑ 1.0 5 1

Nested Loop Left Join (cost=1.21..7.27 rows=5 width=34) (actual time=0.014..0.029 rows=5 loops=1)

66. 0.002 0.002 ↑ 1.0 5 1

Seq Scan on touch_point_group touch_point_group_1 (cost=0.00..1.06 rows=5 width=30) (actual time=0.002..0.002 rows=5 loops=1)

  • Filter: (state <> 'DELETED'::text)
67. 0.010 0.025 ↑ 1.0 1 5

Aggregate (cost=1.21..1.22 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=5)

68. 0.015 0.015 ↑ 2.5 2 5

Seq Scan on activity_type activity_type_5 (cost=0.00..1.20 rows=5 width=16) (actual time=0.002..0.003 rows=2 loops=5)

  • Filter: ((touch_point_group_id = touch_point_group_1.id) AND (state = 'ACTIVE'::text))
  • Rows Removed by Filter: 11
69. 4.284 5.508 ↑ 1.0 1 612

Aggregate (cost=1.65..1.66 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=612)

70. 1.224 1.224 ↑ 1.0 1 612

Seq Scan on activity_type_rule (cost=0.00..1.15 rows=1 width=53) (actual time=0.001..0.002 rows=1 loops=612)

  • Filter: (activity_type_id = at.id)
  • Rows Removed by Filter: 12
71. 1.224 1.836 ↑ 1.0 1 612

Aggregate (cost=9.51..9.52 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=612)

72. 0.000 0.612 ↓ 0.0 0 612

Bitmap Heap Scan on activity_type_dispatch_type (cost=4.16..9.50 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=612)

  • Recheck Cond: (activity_type_id = at.id)
73. 0.612 0.612 ↓ 0.0 0 612

Bitmap Index Scan on pk_activity_type_dispatch_type (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=612)

  • Index Cond: (activity_type_id = at.id)
74. 1.836 12.852 ↑ 1.0 1 612

Aggregate (cost=29.42..29.43 rows=1 width=32) (actual time=0.021..0.021 rows=1 loops=612)

75. 0.000 11.016 ↑ 1.0 1 612

Nested Loop Left Join (cost=19.81..29.41 rows=1 width=94) (actual time=0.016..0.018 rows=1 loops=612)

76. 0.612 8.568 ↑ 1.0 1 612

Nested Loop Left Join (cost=16.68..26.25 rows=1 width=62) (actual time=0.012..0.014 rows=1 loops=612)

77. 0.612 3.060 ↑ 1.0 1 612

Nested Loop (cost=0.27..9.49 rows=1 width=46) (actual time=0.004..0.005 rows=1 loops=612)

78. 1.224 1.224 ↑ 1.0 1 612

Seq Scan on activity_type_assignment (cost=0.00..1.16 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=612)

  • Filter: (activity_type_id = at.id)
  • Rows Removed by Filter: 12
79. 1.224 1.224 ↑ 1.0 1 612

Index Scan using idx_organizational_unit_materialized_path_btree_idx on organizational_unit (cost=0.27..8.29 rows=1 width=29) (actual time=0.002..0.002 rows=1 loops=612)

  • Index Cond: (id = activity_type_assignment.organizational_unit_id)
  • Filter: (state <> 'DELETED'::text)
80. 0.612 4.896 ↑ 1.0 1 612

Nested Loop Left Join (cost=16.41..16.75 rows=1 width=48) (actual time=0.007..0.008 rows=1 loops=612)

81. 0.612 3.672 ↑ 1.0 1 612

Nested Loop (cost=0.53..0.84 rows=1 width=164) (actual time=0.005..0.006 rows=1 loops=612)

82. 0.612 2.448 ↑ 1.0 1 612

Nested Loop (cost=0.40..0.64 rows=1 width=145) (actual time=0.004..0.004 rows=1 loops=612)

83. 1.224 1.224 ↑ 1.0 1 612

Index Scan using pk_organizational_unit on organizational_unit ou (cost=0.27..0.46 rows=1 width=161) (actual time=0.002..0.002 rows=1 loops=612)

  • Index Cond: (id = organizational_unit.id)
  • Filter: (state <> 'DELETED'::text)
84. 0.612 0.612 ↑ 1.0 1 612

Index Scan using pk_organizational_hierarchy on organizational_hierarchy (cost=0.12..0.17 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=612)

  • Index Cond: (id = ou.organizational_hierarchy_id)
  • Filter: (state = 'ACTIVE'::text)
85. 0.612 0.612 ↑ 1.0 1 612

Index Scan using pk_organizational_unit_type on organizational_unit_type (cost=0.13..0.18 rows=1 width=35) (actual time=0.001..0.001 rows=1 loops=612)

  • Index Cond: (id = ou.organizational_unit_type_id)
  • Filter: (state = 'ACTIVE'::text)
86. 0.612 0.612 ↑ 1.0 1 612

Aggregate (cost=15.88..15.89 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=612)

87. 0.000 0.000 ↓ 0.0 0 612

Seq Scan on organizational_unit_tag (cost=0.00..15.88 rows=2 width=32) (actual time=0.000..0.000 rows=0 loops=612)

  • Filter: (organizational_unit_id = ou.id)
88. 1.224 2.448 ↑ 1.0 1 612

Aggregate (cost=3.13..3.14 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=612)

89. 0.561 1.224 ↓ 0.0 0 612

Nested Loop (cost=0.00..3.12 rows=1 width=71) (actual time=0.002..0.002 rows=0 loops=612)

  • Join Filter: (consent_item.consent_type_id = consent_type.id)
  • Rows Removed by Join Filter: 0
90. 0.000 0.612 ↓ 0.0 0 612

Nested Loop (cost=0.00..2.08 rows=1 width=45) (actual time=0.001..0.001 rows=0 loops=612)

  • Join Filter: (activity_type_assignment_consent_item.consent_item_id = consent_item.id)
91. 0.612 0.612 ↓ 0.0 0 612

Seq Scan on activity_type_assignment_consent_item (cost=0.00..1.01 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=612)

  • Filter: (activity_type_assignment_id = activity_type_assignment.id)
  • Rows Removed by Filter: 1
92. 0.051 0.051 ↑ 3.0 1 51

Seq Scan on consent_item (cost=0.00..1.03 rows=3 width=45) (actual time=0.001..0.001 rows=1 loops=51)

93. 0.051 0.051 ↑ 1.0 2 51

Seq Scan on consent_type (cost=0.00..1.02 rows=2 width=42) (actual time=0.001..0.001 rows=2 loops=51)

94. 1.224 1.836 ↑ 1.0 1 612

Aggregate (cost=33.30..33.31 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=612)

95. 0.000 0.612 ↓ 0.0 0 612

Nested Loop Left Join (cost=12.05..33.29 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=612)

96. 0.612 0.612 ↓ 0.0 0 612

Nested Loop (cost=11.46..26.17 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=612)

97. 0.000 0.000 ↓ 0.0 0 612

Hash Join (cost=11.32..25.11 rows=3 width=36) (actual time=0.000..0.000 rows=0 loops=612)

  • Hash Cond: (comment_type_1.id = activity_type_comment_type.comment_type_id)
98. 0.000 0.000 ↓ 0.0 0 612

Seq Scan on comment_type comment_type_1 (cost=0.00..13.00 rows=300 width=16) (actual time=0.000..0.000 rows=0 loops=612)

99. 0.000 0.000 ↓ 0.0 0

Hash (cost=11.28..11.28 rows=3 width=20) (never executed)

100. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on activity_type_comment_type (cost=4.17..11.28 rows=3 width=20) (never executed)

  • Recheck Cond: (activity_type_id = at.id)
101. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pk_activity_type_comment_type (cost=0.00..4.17 rows=3 width=0) (never executed)

  • Index Cond: (activity_type_id = at.id)
102. 0.000 0.000 ↓ 0.0 0

Index Scan using comment_type_pkey on comment_type (cost=0.15..0.31 rows=1 width=16) (never executed)

  • Index Cond: (id = comment_type_1.id)
  • Filter: (state = 'ACTIVE'::text)
103. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.59..7.11 rows=1 width=48) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.44..6.79 rows=1 width=192) (never executed)

105. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..6.48 rows=1 width=160) (never executed)

106. 0.000 0.000 ↓ 0.0 0

Index Scan using comment_type_pkey on comment_type act_com_type (cost=0.15..6.17 rows=1 width=144) (never executed)

  • Index Cond: (id = comment_type.id)
  • Filter: (state <> 'DELETED'::text)
107. 0.000 0.000 ↓ 0.0 0

Index Only Scan using comment_type_pkey on comment_type comment_type_2 (cost=0.15..0.31 rows=1 width=16) (never executed)

  • Index Cond: (id = act_com_type.id)
  • Heap Fetches: 0
108. 0.000 0.000 ↓ 0.0 0

Index Only Scan using comment_type_pkey on comment_type comment_type_3 (cost=0.15..0.31 rows=1 width=48) (never executed)

  • Index Cond: (id = comment_type_2.id)
  • Heap Fetches: 0
109. 0.000 0.000 ↓ 0.0 0

Index Only Scan using comment_type_pkey on comment_type comment_type_4 (cost=0.15..0.31 rows=1 width=48) (never executed)

  • Index Cond: (id = comment_type_2.id)
  • Heap Fetches: 0
110. 0.000 0.000 ↑ 2.2 6 612

Materialize (cost=0.00..1.19 rows=13 width=16) (actual time=0.000..0.000 rows=6 loops=612)

111. 0.004 0.004 ↑ 1.1 12 1

Seq Scan on activity_type activity_type_1 (cost=0.00..1.13 rows=13 width=16) (actual time=0.002..0.004 rows=12 loops=1)

112.          

SubPlan (forNested Loop Left Join)

113. 0.120 0.408 ↑ 1.0 1 51

Hash Join (cost=1.21..2.46 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=51)

  • Hash Cond: (template.id = template_topic.template_id)
114. 0.084 0.084 ↑ 2.5 4 28

Seq Scan on template (cost=0.00..1.21 rows=10 width=16) (actual time=0.002..0.003 rows=4 loops=28)

  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 6
115. 0.102 0.204 ↓ 1.5 3 51

Hash (cost=1.19..1.19 rows=2 width=16) (actual time=0.004..0.004 rows=3 loops=51)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
116. 0.102 0.102 ↓ 1.5 3 51

Seq Scan on template_topic (cost=0.00..1.19 rows=2 width=16) (actual time=0.002..0.002 rows=3 loops=51)

  • Filter: (t.id = topic_id)
  • Rows Removed by Filter: 12
117. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.34..2.54 rows=9 width=16) (never executed)

  • Hash Cond: (template_topic_1.template_id = template_1.id)
118. 0.000 0.000 ↓ 0.0 0

Seq Scan on template_topic template_topic_1 (cost=0.00..1.15 rows=15 width=32) (never executed)

119. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.21..1.21 rows=10 width=16) (never executed)

120. 0.000 0.000 ↓ 0.0 0

Seq Scan on template template_1 (cost=0.00..1.21 rows=10 width=16) (never executed)

  • Filter: ((state)::text = 'ACTIVE'::text)
121. 1.848 297.792 ↑ 1.0 1 24

Aggregate (cost=14,774.24..14,774.25 rows=1 width=32) (actual time=12.408..12.408 rows=1 loops=24)

122. 0.096 295.944 ↑ 1.3 3 24

Nested Loop Left Join (cost=3,695.75..14,774.23 rows=4 width=64) (actual time=4.028..12.331 rows=3 loops=24)

123. 0.128 0.528 ↑ 1.3 3 24

Hash Join (cost=5.62..6.87 rows=4 width=48) (actual time=0.017..0.022 rows=3 loops=24)

  • Hash Cond: (key_message.id = key_message_1.id)
124. 0.088 0.088 ↑ 1.0 13 22

Seq Scan on key_message (cost=0.00..1.16 rows=13 width=48) (actual time=0.001..0.004 rows=13 loops=22)

  • Filter: (state <> 'DELETED'::text)
125. 0.048 0.312 ↑ 1.3 3 24

Hash (cost=5.57..5.57 rows=4 width=32) (actual time=0.013..0.013 rows=3 loops=24)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
126. 0.076 0.264 ↑ 1.3 3 24

Hash Join (cost=4.39..5.57 rows=4 width=32) (actual time=0.009..0.011 rows=3 loops=24)

  • Hash Cond: (key_message_1.id = media_key_message.key_message_id)
127. 0.044 0.044 ↑ 1.0 13 22

Seq Scan on key_message key_message_1 (cost=0.00..1.13 rows=13 width=16) (actual time=0.001..0.002 rows=13 loops=22)

128. 0.048 0.144 ↑ 1.3 3 24

Hash (cost=4.34..4.34 rows=4 width=16) (actual time=0.006..0.006 rows=3 loops=24)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
129. 0.096 0.096 ↑ 1.3 3 24

Index Only Scan using media_key_message_pkey on media_key_message (cost=0.27..4.34 rows=4 width=16) (actual time=0.004..0.004 rows=3 loops=24)

  • Index Cond: (media_id = vm.id)
  • Heap Fetches: 0
130. 0.414 295.320 ↑ 1.0 1 69

Nested Loop Left Join (cost=3,690.13..3,691.83 rows=1 width=48) (actual time=4.279..4.280 rows=1 loops=69)

131. 0.069 0.345 ↑ 1.0 1 69

Nested Loop (cost=0.27..1.94 rows=1 width=119) (actual time=0.004..0.005 rows=1 loops=69)

132. 0.207 0.207 ↑ 1.0 1 69

Index Scan using key_message_pkey on key_message key_message_2 (cost=0.14..1.08 rows=1 width=119) (actual time=0.002..0.003 rows=1 loops=69)

  • Index Cond: (key_message.id = id)
  • Filter: (state <> 'DELETED'::text)
133. 0.069 0.069 ↑ 1.0 1 69

Index Only Scan using key_message_pkey on key_message key_message_3 (cost=0.14..0.77 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=69)

  • Index Cond: (id = key_message_2.id)
  • Heap Fetches: 0
134. 1.656 294.561 ↑ 1.0 1 69

Aggregate (cost=3,689.86..3,689.87 rows=1 width=32) (actual time=4.269..4.269 rows=1 loops=69)

135. 0.138 292.905 ↑ 1.0 6 69

Nested Loop Left Join (cost=614.03..3,689.85 rows=6 width=51) (actual time=0.720..4.245 rows=6 loops=69)

136. 0.483 1.311 ↑ 1.0 6 69

Hash Join (cost=3.05..4.30 rows=6 width=35) (actual time=0.013..0.019 rows=6 loops=69)

  • Hash Cond: (topic_1.id = key_message_topic.topic_id)
137. 0.207 0.207 ↑ 1.0 16 69

Seq Scan on topic topic_1 (cost=0.00..1.20 rows=16 width=35) (actual time=0.001..0.003 rows=16 loops=69)

  • Filter: (state <> 'DELETED'::text)
138. 0.138 0.621 ↑ 1.0 6 69

Hash (cost=2.98..2.98 rows=6 width=16) (actual time=0.009..0.009 rows=6 loops=69)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
139. 0.483 0.483 ↑ 1.0 6 69

Seq Scan on key_message_topic (cost=0.00..2.98 rows=6 width=16) (actual time=0.004..0.007 rows=6 loops=69)

  • Filter: (key_message_id = key_message_2.id)
  • Rows Removed by Filter: 72
140. 1.656 291.456 ↑ 1.0 1 414

Nested Loop Left Join (cost=610.98..614.25 rows=1 width=48) (actual time=0.703..0.704 rows=1 loops=414)

141. 0.828 0.828 ↑ 1.0 1 414

Index Scan using topic_pkey on topic t_1 (cost=0.14..0.90 rows=1 width=47) (actual time=0.002..0.002 rows=1 loops=414)

  • Index Cond: (id = topic_1.id)
  • Filter: (state <> 'DELETED'::text)
142. 9.522 286.488 ↑ 1.0 1 414

Aggregate (cost=610.85..610.86 rows=1 width=32) (actual time=0.692..0.692 rows=1 loops=414)

143. 6.210 276.966 ↓ 1.7 12 414

Nested Loop (cost=83.06..610.83 rows=7 width=52) (actual time=0.056..0.669 rows=12 loops=414)

  • Join Filter: (activity_type_6.id = activity_type_7.id)
  • Rows Removed by Join Filter: 66
144. 0.414 270.756 ↓ 1.7 12 414

Nested Loop Left Join (cost=83.06..608.47 rows=7 width=84) (actual time=0.055..0.654 rows=12 loops=414)

145. 2.475 7.038 ↓ 1.7 12 414

Hash Join (cost=1.31..3.94 rows=7 width=52) (actual time=0.005..0.017 rows=12 loops=414)

  • Hash Cond: (topic_activity_type_1.activity_type_id = activity_type_6.id)
146. 4.554 4.554 ↓ 1.5 12 414

Seq Scan on topic_activity_type topic_activity_type_1 (cost=0.00..2.60 rows=8 width=16) (actual time=0.004..0.011 rows=12 loops=414)

  • Filter: (topic_id = t_1.id)
  • Rows Removed by Filter: 116
147. 0.005 0.009 ↓ 1.1 13 1

Hash (cost=1.16..1.16 rows=12 width=36) (actual time=0.009..0.009 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
148. 0.004 0.004 ↓ 1.1 13 1

Seq Scan on activity_type activity_type_6 (cost=0.00..1.16 rows=12 width=36) (actual time=0.002..0.004 rows=13 loops=1)

  • Filter: (state <> 'DELETED'::text)
149. 9.936 263.304 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=81.75..86.35 rows=1 width=48) (actual time=0.049..0.053 rows=1 loops=4,968)

150. 4.968 238.464 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=48.46..53.02 rows=1 width=269) (actual time=0.045..0.048 rows=1 loops=4,968)

151. 0.000 129.168 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=19.04..23.58 rows=1 width=237) (actual time=0.024..0.026 rows=1 loops=4,968)

152. 4.968 114.264 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=9.53..14.03 rows=1 width=205) (actual time=0.020..0.023 rows=1 loops=4,968)

153. 4.968 64.584 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=7.87..12.35 rows=1 width=173) (actual time=0.010..0.013 rows=1 loops=4,968)

  • Join Filter: (touch_point_group_2.id = touch_point_group_3.id)
  • Rows Removed by Join Filter: 4
154. 4.968 44.712 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=0.54..4.85 rows=1 width=157) (actual time=0.009..0.009 rows=1 loops=4,968)

  • Join Filter: (touch_point_group_2.id = at_1.touch_point_group_id)
  • Rows Removed by Join Filter: 2
155. 4.968 34.776 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=0.54..3.73 rows=1 width=157) (actual time=0.006..0.007 rows=1 loops=4,968)

156. 0.000 24.840 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=0.41..2.87 rows=1 width=141) (actual time=0.005..0.005 rows=1 loops=4,968)

157. 4.968 19.872 ↑ 1.0 1 4,968

Nested Loop (cost=0.27..2.01 rows=1 width=109) (actual time=0.003..0.004 rows=1 loops=4,968)

158. 9.936 9.936 ↑ 1.0 1 4,968

Index Scan using activity_type_pkey on activity_type at_1 (cost=0.14..1.15 rows=1 width=93) (actual time=0.001..0.002 rows=1 loops=4,968)

  • Index Cond: (id = activity_type_6.id)
159. 4.968 4.968 ↑ 1.0 1 4,968

Index Only Scan using activity_type_pkey on activity_type activity_type_8 (cost=0.14..0.77 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=4,968)

  • Index Cond: (id = at_1.id)
  • Heap Fetches: 4968
160. 4.968 4.968 ↑ 1.0 1 4,968

Index Only Scan using activity_type_pkey on activity_type activity_type_9 (cost=0.14..0.77 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=4,968)

  • Index Cond: (id = activity_type_8.id)
  • Heap Fetches: 4968
161. 4.968 4.968 ↑ 1.0 1 4,968

Index Only Scan using activity_type_pkey on activity_type activity_type_10 (cost=0.14..0.77 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=4,968)

  • Index Cond: (id = activity_type_8.id)
  • Heap Fetches: 4968
162. 4.968 4.968 ↑ 2.5 2 4,968

Seq Scan on touch_point_group touch_point_group_2 (cost=0.00..1.06 rows=5 width=16) (actual time=0.001..0.001 rows=2 loops=4,968)

  • Filter: (state <> 'DELETED'::text)
163. 14.904 14.904 ↑ 1.0 5 4,968

Group (cost=7.33..7.38 rows=5 width=52) (actual time=0.001..0.003 rows=5 loops=4,968)

  • Group Key: touch_point_group_3.id, (array_length(COALESCE(array_agg(activity_type_11.id), '{}'::uuid[]), 1))
164. 0.000 0.000 ↑ 1.0 5 4,968

Sort (cost=7.33..7.35 rows=5 width=34) (actual time=0.000..0.000 rows=5 loops=4,968)

  • Sort Key: touch_point_group_3.id, (array_length(COALESCE(array_agg(activity_type_11.id), '{}'::uuid[]), 1))
  • Sort Method: quicksort Memory: 25kB
165. 0.003 0.026 ↑ 1.0 5 1

Nested Loop Left Join (cost=1.21..7.27 rows=5 width=34) (actual time=0.012..0.026 rows=5 loops=1)

166. 0.003 0.003 ↑ 1.0 5 1

Seq Scan on touch_point_group touch_point_group_3 (cost=0.00..1.06 rows=5 width=30) (actual time=0.002..0.003 rows=5 loops=1)

  • Filter: (state <> 'DELETED'::text)
167. 0.010 0.020 ↑ 1.0 1 5

Aggregate (cost=1.21..1.22 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=5)

168. 0.010 0.010 ↑ 2.5 2 5

Seq Scan on activity_type activity_type_11 (cost=0.00..1.20 rows=5 width=16) (actual time=0.002..0.002 rows=2 loops=5)

  • Filter: ((touch_point_group_id = touch_point_group_3.id) AND (state = 'ACTIVE'::text))
  • Rows Removed by Filter: 11
169. 34.776 44.712 ↑ 1.0 1 4,968

Aggregate (cost=1.65..1.66 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=4,968)

170. 9.936 9.936 ↑ 1.0 1 4,968

Seq Scan on activity_type_rule activity_type_rule_1 (cost=0.00..1.15 rows=1 width=53) (actual time=0.001..0.002 rows=1 loops=4,968)

  • Filter: (activity_type_id = at_1.id)
  • Rows Removed by Filter: 12
171. 9.936 14.904 ↑ 1.0 1 4,968

Aggregate (cost=9.51..9.52 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=4,968)

172. 0.000 4.968 ↓ 0.0 0 4,968

Bitmap Heap Scan on activity_type_dispatch_type activity_type_dispatch_type_1 (cost=4.16..9.50 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=4,968)

  • Recheck Cond: (activity_type_id = at_1.id)
173. 4.968 4.968 ↓ 0.0 0 4,968

Bitmap Index Scan on pk_activity_type_dispatch_type (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=4,968)

  • Index Cond: (activity_type_id = at_1.id)
174. 14.904 104.328 ↑ 1.0 1 4,968

Aggregate (cost=29.42..29.43 rows=1 width=32) (actual time=0.021..0.021 rows=1 loops=4,968)

175. 4.968 89.424 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=19.81..29.41 rows=1 width=94) (actual time=0.016..0.018 rows=1 loops=4,968)

176. 0.000 64.584 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=16.68..26.25 rows=1 width=62) (actual time=0.012..0.013 rows=1 loops=4,968)

177. 4.968 24.840 ↑ 1.0 1 4,968

Nested Loop (cost=0.27..9.49 rows=1 width=46) (actual time=0.004..0.005 rows=1 loops=4,968)

178. 9.936 9.936 ↑ 1.0 1 4,968

Seq Scan on activity_type_assignment activity_type_assignment_1 (cost=0.00..1.16 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=4,968)

  • Filter: (activity_type_id = at_1.id)
  • Rows Removed by Filter: 12
179. 9.936 9.936 ↑ 1.0 1 4,968

Index Scan using idx_organizational_unit_materialized_path_btree_idx on organizational_unit organizational_unit_1 (cost=0.27..8.29 rows=1 width=29) (actual time=0.002..0.002 rows=1 loops=4,968)

  • Index Cond: (id = activity_type_assignment_1.organizational_unit_id)
  • Filter: (state <> 'DELETED'::text)
180. 4.968 39.744 ↑ 1.0 1 4,968

Nested Loop Left Join (cost=16.41..16.75 rows=1 width=48) (actual time=0.007..0.008 rows=1 loops=4,968)

181. 4.968 29.808 ↑ 1.0 1 4,968

Nested Loop (cost=0.53..0.84 rows=1 width=164) (actual time=0.005..0.006 rows=1 loops=4,968)

182. 4.968 19.872 ↑ 1.0 1 4,968

Nested Loop (cost=0.40..0.64 rows=1 width=145) (actual time=0.003..0.004 rows=1 loops=4,968)

183. 9.936 9.936 ↑ 1.0 1 4,968

Index Scan using pk_organizational_unit on organizational_unit ou_1 (cost=0.27..0.46 rows=1 width=161) (actual time=0.002..0.002 rows=1 loops=4,968)

  • Index Cond: (id = organizational_unit_1.id)
  • Filter: (state <> 'DELETED'::text)
184. 4.968 4.968 ↑ 1.0 1 4,968

Index Scan using pk_organizational_hierarchy on organizational_hierarchy organizational_hierarchy_1 (cost=0.12..0.17 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=4,968)

  • Index Cond: (id = ou_1.organizational_hierarchy_id)
  • Filter: (state = 'ACTIVE'::text)
185. 4.968 4.968 ↑ 1.0 1 4,968

Index Scan using pk_organizational_unit_type on organizational_unit_type organizational_unit_type_1 (cost=0.13..0.18 rows=1 width=35) (actual time=0.001..0.001 rows=1 loops=4,968)

  • Index Cond: (id = ou_1.organizational_unit_type_id)
  • Filter: (state = 'ACTIVE'::text)
186. 4.968 4.968 ↑ 1.0 1 4,968

Aggregate (cost=15.88..15.89 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=4,968)

187. 0.000 0.000 ↓ 0.0 0 4,968

Seq Scan on organizational_unit_tag organizational_unit_tag_1 (cost=0.00..15.88 rows=2 width=32) (actual time=0.000..0.000 rows=0 loops=4,968)

  • Filter: (organizational_unit_id = ou_1.id)
188. 9.936 19.872 ↑ 1.0 1 4,968

Aggregate (cost=3.13..3.14 rows=1 width=32) (actual time=0.003..0.004 rows=1 loops=4,968)

189. 4.554 9.936 ↓ 0.0 0 4,968

Nested Loop (cost=0.00..3.12 rows=1 width=71) (actual time=0.002..0.002 rows=0 loops=4,968)

  • Join Filter: (consent_item_1.consent_type_id = consent_type_1.id)
  • Rows Removed by Join Filter: 0
190. 0.000 4.968 ↓ 0.0 0 4,968

Nested Loop (cost=0.00..2.08 rows=1 width=45) (actual time=0.001..0.001 rows=0 loops=4,968)

  • Join Filter: (activity_type_assignment_consent_item_1.consent_item_id = consent_item_1.id)
191. 4.968 4.968 ↓ 0.0 0 4,968

Seq Scan on activity_type_assignment_consent_item activity_type_assignment_consent_item_1 (cost=0.00..1.01 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=4,968)

  • Filter: (activity_type_assignment_id = activity_type_assignment_1.id)
  • Rows Removed by Filter: 1
192. 0.414 0.414 ↑ 3.0 1 414

Seq Scan on consent_item consent_item_1 (cost=0.00..1.03 rows=3 width=45) (actual time=0.001..0.001 rows=1 loops=414)

193. 0.414 0.414 ↑ 1.0 2 414

Seq Scan on consent_type consent_type_1 (cost=0.00..1.02 rows=2 width=42) (actual time=0.001..0.001 rows=2 loops=414)

194. 9.936 14.904 ↑ 1.0 1 4,968

Aggregate (cost=33.30..33.31 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=4,968)

195. 0.000 4.968 ↓ 0.0 0 4,968

Nested Loop Left Join (cost=12.05..33.29 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=4,968)

196. 4.968 4.968 ↓ 0.0 0 4,968

Nested Loop (cost=11.46..26.17 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=4,968)

197. 0.000 0.000 ↓ 0.0 0 4,968

Hash Join (cost=11.32..25.11 rows=3 width=36) (actual time=0.000..0.000 rows=0 loops=4,968)

  • Hash Cond: (comment_type_6.id = activity_type_comment_type_1.comment_type_id)
198. 0.000 0.000 ↓ 0.0 0 4,968

Seq Scan on comment_type comment_type_6 (cost=0.00..13.00 rows=300 width=16) (actual time=0.000..0.000 rows=0 loops=4,968)

199. 0.000 0.000 ↓ 0.0 0

Hash (cost=11.28..11.28 rows=3 width=20) (never executed)

200. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on activity_type_comment_type activity_type_comment_type_1 (cost=4.17..11.28 rows=3 width=20) (never executed)

  • Recheck Cond: (activity_type_id = at_1.id)
201. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pk_activity_type_comment_type (cost=0.00..4.17 rows=3 width=0) (never executed)

  • Index Cond: (activity_type_id = at_1.id)
202. 0.000 0.000 ↓ 0.0 0

Index Scan using comment_type_pkey on comment_type comment_type_5 (cost=0.15..0.31 rows=1 width=16) (never executed)

  • Index Cond: (id = comment_type_6.id)
  • Filter: (state = 'ACTIVE'::text)
203. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.59..7.11 rows=1 width=48) (never executed)

204. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.44..6.79 rows=1 width=192) (never executed)

205. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..6.48 rows=1 width=160) (never executed)

206. 0.000 0.000 ↓ 0.0 0

Index Scan using comment_type_pkey on comment_type act_com_type_1 (cost=0.15..6.17 rows=1 width=144) (never executed)

  • Index Cond: (id = comment_type_5.id)
  • Filter: (state <> 'DELETED'::text)
207. 0.000 0.000 ↓ 0.0 0

Index Only Scan using comment_type_pkey on comment_type comment_type_7 (cost=0.15..0.31 rows=1 width=16) (never executed)

  • Index Cond: (id = act_com_type_1.id)
  • Heap Fetches: 0
208. 0.000 0.000 ↓ 0.0 0

Index Only Scan using comment_type_pkey on comment_type comment_type_8 (cost=0.15..0.31 rows=1 width=48) (never executed)

  • Index Cond: (id = comment_type_7.id)
  • Heap Fetches: 0
209. 0.000 0.000 ↓ 0.0 0

Index Only Scan using comment_type_pkey on comment_type comment_type_9 (cost=0.15..0.31 rows=1 width=48) (never executed)

  • Index Cond: (id = comment_type_7.id)
  • Heap Fetches: 0
210. 0.000 0.000 ↑ 2.2 6 4,968

Materialize (cost=0.00..1.19 rows=13 width=16) (actual time=0.000..0.000 rows=6 loops=4,968)

211. 0.003 0.003 ↑ 1.1 12 1

Seq Scan on activity_type activity_type_7 (cost=0.00..1.13 rows=13 width=16) (actual time=0.002..0.003 rows=12 loops=1)

212.          

SubPlan (forNested Loop Left Join)

213. 0.966 2.484 ↓ 0.0 0 414

Hash Join (cost=1.21..2.46 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=414)

  • Hash Cond: (template_2.id = template_topic_2.template_id)
214. 0.276 0.276 ↑ 2.5 4 138

Seq Scan on template template_2 (cost=0.00..1.21 rows=10 width=16) (actual time=0.002..0.002 rows=4 loops=138)

  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 6
215. 0.414 1.242 ↑ 1.0 2 414

Hash (cost=1.19..1.19 rows=2 width=16) (actual time=0.003..0.003 rows=2 loops=414)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
216. 0.828 0.828 ↑ 1.0 2 414

Seq Scan on template_topic template_topic_2 (cost=0.00..1.19 rows=2 width=16) (actual time=0.002..0.002 rows=2 loops=414)

  • Filter: (t_1.id = topic_id)
  • Rows Removed by Filter: 13
217. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.34..2.54 rows=9 width=16) (never executed)

  • Hash Cond: (template_topic_3.template_id = template_3.id)
218. 0.000 0.000 ↓ 0.0 0

Seq Scan on template_topic template_topic_3 (cost=0.00..1.15 rows=15 width=32) (never executed)

219. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.21..1.21 rows=10 width=16) (never executed)

220. 0.000 0.000 ↓ 0.0 0

Seq Scan on template template_3 (cost=0.00..1.21 rows=10 width=16) (never executed)

  • Filter: ((state)::text = 'ACTIVE'::text)
221. 0.192 5.640 ↑ 1.0 1 24

Aggregate (cost=266.61..266.62 rows=1 width=32) (actual time=0.235..0.235 rows=1 loops=24)

222. 0.096 5.448 ↑ 1.0 3 24

Nested Loop (cost=83.40..266.60 rows=3 width=52) (actual time=0.213..0.227 rows=3 loops=24)

  • Join Filter: (activity_type_12.id = activity_type_13.id)
  • Rows Removed by Join Filter: 39
223. 0.048 0.048 ↑ 1.0 13 24

Seq Scan on activity_type activity_type_13 (cost=0.00..1.13 rows=13 width=16) (actual time=0.001..0.002 rows=13 loops=24)

224. 0.216 5.304 ↑ 1.0 3 312

Materialize (cost=83.40..264.90 rows=3 width=84) (actual time=0.007..0.017 rows=3 loops=312)

225. 0.060 5.088 ↑ 1.0 3 24

Nested Loop Left Join (cost=83.40..264.88 rows=3 width=84) (actual time=0.086..0.212 rows=3 loops=24)

226. 0.120 0.504 ↑ 1.0 3 24

Merge Join (cost=1.65..5.80 rows=3 width=52) (actual time=0.016..0.021 rows=3 loops=24)

  • Merge Cond: (activity_type_12.id = media_activity_type.activity_type_id)
227. 0.168 0.264 ↑ 1.0 12 24

Sort (cost=1.38..1.41 rows=12 width=36) (actual time=0.010..0.011 rows=12 loops=24)

  • Sort Key: activity_type_12.id
  • Sort Method: quicksort Memory: 26kB
228. 0.096 0.096 ↓ 1.1 13 24

Seq Scan on activity_type activity_type_12 (cost=0.00..1.16 rows=12 width=36) (actual time=0.001..0.004 rows=13 loops=24)

  • Filter: (state <> 'DELETED'::text)
229. 0.120 0.120 ↑ 1.0 3 24

Index Only Scan using media_activity_type_pkey on media_activity_type (cost=0.27..4.33 rows=3 width=16) (actual time=0.004..0.005 rows=3 loops=24)

  • Index Cond: (media_id = vm.id)
  • Heap Fetches: 0
230. 0.390 4.524 ↑ 1.0 1 78

Nested Loop Left Join (cost=81.75..86.35 rows=1 width=48) (actual time=0.054..0.058 rows=1 loops=78)

231. 0.078 4.134 ↑ 1.0 1 78

Nested Loop Left Join (cost=48.46..53.02 rows=1 width=269) (actual time=0.049..0.053 rows=1 loops=78)

232. 0.156 2.340 ↑ 1.0 1 78

Nested Loop Left Join (cost=19.04..23.58 rows=1 width=237) (actual time=0.026..0.030 rows=1 loops=78)

233. 0.078 1.950 ↑ 1.0 1 78

Nested Loop Left Join (cost=9.53..14.03 rows=1 width=205) (actual time=0.021..0.025 rows=1 loops=78)

234. 0.078 1.092 ↑ 1.0 1 78

Nested Loop Left Join (cost=7.87..12.35 rows=1 width=173) (actual time=0.011..0.014 rows=1 loops=78)

  • Join Filter: (touch_point_group_4.id = touch_point_group_5.id)
  • Rows Removed by Join Filter: 4
235. 0.078 0.780 ↑ 1.0 1 78

Nested Loop Left Join (cost=0.54..4.85 rows=1 width=157) (actual time=0.009..0.010 rows=1 loops=78)

  • Join Filter: (touch_point_group_4.id = at_2.touch_point_group_id)
236. 0.078 0.624 ↑ 1.0 1 78

Nested Loop Left Join (cost=0.54..3.73 rows=1 width=157) (actual time=0.007..0.008 rows=1 loops=78)

237. 0.078 0.468 ↑ 1.0 1 78

Nested Loop Left Join (cost=0.41..2.87 rows=1 width=141) (actual time=0.005..0.006 rows=1 loops=78)

238. 0.078 0.312 ↑ 1.0 1 78

Nested Loop (cost=0.27..2.01 rows=1 width=109) (actual time=0.004..0.004 rows=1 loops=78)

239. 0.156 0.156 ↑ 1.0 1 78

Index Scan using activity_type_pkey on activity_type at_2 (cost=0.14..1.15 rows=1 width=93) (actual time=0.001..0.002 rows=1 loops=78)

  • Index Cond: (id = activity_type_12.id)
240. 0.078 0.078 ↑ 1.0 1 78

Index Only Scan using activity_type_pkey on activity_type activity_type_14 (cost=0.14..0.77 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=78)

  • Index Cond: (id = at_2.id)
  • Heap Fetches: 78
241. 0.078 0.078 ↑ 1.0 1 78

Index Only Scan using activity_type_pkey on activity_type activity_type_15 (cost=0.14..0.77 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=78)

  • Index Cond: (id = activity_type_14.id)
  • Heap Fetches: 78
242. 0.078 0.078 ↑ 1.0 1 78

Index Only Scan using activity_type_pkey on activity_type activity_type_16 (cost=0.14..0.77 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=78)

  • Index Cond: (id = activity_type_14.id)
  • Heap Fetches: 78
243. 0.078 0.078 ↑ 5.0 1 78

Seq Scan on touch_point_group touch_point_group_4 (cost=0.00..1.06 rows=5 width=16) (actual time=0.001..0.001 rows=1 loops=78)

  • Filter: (state <> 'DELETED'::text)
244. 0.156 0.234 ↑ 1.0 5 78

Group (cost=7.33..7.38 rows=5 width=52) (actual time=0.001..0.003 rows=5 loops=78)

  • Group Key: touch_point_group_5.id, (array_length(COALESCE(array_agg(activity_type_17.id), '{}'::uuid[]), 1))
245. 0.051 0.078 ↑ 1.0 5 78

Sort (cost=7.33..7.35 rows=5 width=34) (actual time=0.001..0.001 rows=5 loops=78)

  • Sort Key: touch_point_group_5.id, (array_length(COALESCE(array_agg(activity_type_17.id), '{}'::uuid[]), 1))
  • Sort Method: quicksort Memory: 25kB
246. 0.004 0.027 ↑ 1.0 5 1

Nested Loop Left Join (cost=1.21..7.27 rows=5 width=34) (actual time=0.012..0.027 rows=5 loops=1)

247. 0.003 0.003 ↑ 1.0 5 1

Seq Scan on touch_point_group touch_point_group_5 (cost=0.00..1.06 rows=5 width=30) (actual time=0.002..0.003 rows=5 loops=1)

  • Filter: (state <> 'DELETED'::text)
248. 0.005 0.020 ↑ 1.0 1 5

Aggregate (cost=1.21..1.22 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=5)

249. 0.015 0.015 ↑ 2.5 2 5

Seq Scan on activity_type activity_type_17 (cost=0.00..1.20 rows=5 width=16) (actual time=0.002..0.003 rows=2 loops=5)

  • Filter: ((touch_point_group_id = touch_point_group_5.id) AND (state = 'ACTIVE'::text))
  • Rows Removed by Filter: 11
250. 0.624 0.780 ↑ 1.0 1 78

Aggregate (cost=1.65..1.66 rows=1 width=32) (actual time=0.010..0.010 rows=1 loops=78)

251. 0.156 0.156 ↑ 1.0 1 78

Seq Scan on activity_type_rule activity_type_rule_2 (cost=0.00..1.15 rows=1 width=53) (actual time=0.001..0.002 rows=1 loops=78)

  • Filter: (activity_type_id = at_2.id)
  • Rows Removed by Filter: 12
252. 0.156 0.234 ↑ 1.0 1 78

Aggregate (cost=9.51..9.52 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=78)

253. 0.000 0.078 ↓ 0.0 0 78

Bitmap Heap Scan on activity_type_dispatch_type activity_type_dispatch_type_2 (cost=4.16..9.50 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=78)

  • Recheck Cond: (activity_type_id = at_2.id)
254. 0.078 0.078 ↓ 0.0 0 78

Bitmap Index Scan on pk_activity_type_dispatch_type (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=78)

  • Index Cond: (activity_type_id = at_2.id)
255. 0.234 1.716 ↑ 1.0 1 78

Aggregate (cost=29.42..29.43 rows=1 width=32) (actual time=0.022..0.022 rows=1 loops=78)

256. 0.078 1.482 ↑ 1.0 1 78

Nested Loop Left Join (cost=19.81..29.41 rows=1 width=94) (actual time=0.017..0.019 rows=1 loops=78)

257. 0.078 1.170 ↑ 1.0 1 78

Nested Loop Left Join (cost=16.68..26.25 rows=1 width=62) (actual time=0.013..0.015 rows=1 loops=78)

258. 0.078 0.390 ↑ 1.0 1 78

Nested Loop (cost=0.27..9.49 rows=1 width=46) (actual time=0.004..0.005 rows=1 loops=78)

259. 0.156 0.156 ↑ 1.0 1 78

Seq Scan on activity_type_assignment activity_type_assignment_2 (cost=0.00..1.16 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=78)

  • Filter: (activity_type_id = at_2.id)
  • Rows Removed by Filter: 12
260. 0.156 0.156 ↑ 1.0 1 78

Index Scan using idx_organizational_unit_materialized_path_btree_idx on organizational_unit organizational_unit_2 (cost=0.27..8.29 rows=1 width=29) (actual time=0.002..0.002 rows=1 loops=78)

  • Index Cond: (id = activity_type_assignment_2.organizational_unit_id)
  • Filter: (state <> 'DELETED'::text)
261. 0.156 0.702 ↑ 1.0 1 78

Nested Loop Left Join (cost=16.41..16.75 rows=1 width=48) (actual time=0.008..0.009 rows=1 loops=78)

262. 0.078 0.468 ↑ 1.0 1 78

Nested Loop (cost=0.53..0.84 rows=1 width=164) (actual time=0.006..0.006 rows=1 loops=78)

263. 0.078 0.312 ↑ 1.0 1 78

Nested Loop (cost=0.40..0.64 rows=1 width=145) (actual time=0.004..0.004 rows=1 loops=78)

264. 0.156 0.156 ↑ 1.0 1 78

Index Scan using pk_organizational_unit on organizational_unit ou_2 (cost=0.27..0.46 rows=1 width=161) (actual time=0.002..0.002 rows=1 loops=78)

  • Index Cond: (id = organizational_unit_2.id)
  • Filter: (state <> 'DELETED'::text)
265. 0.078 0.078 ↑ 1.0 1 78

Index Scan using pk_organizational_hierarchy on organizational_hierarchy organizational_hierarchy_2 (cost=0.12..0.17 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=78)

  • Index Cond: (id = ou_2.organizational_hierarchy_id)
  • Filter: (state = 'ACTIVE'::text)
266. 0.078 0.078 ↑ 1.0 1 78

Index Scan using pk_organizational_unit_type on organizational_unit_type organizational_unit_type_2 (cost=0.13..0.18 rows=1 width=35) (actual time=0.001..0.001 rows=1 loops=78)

  • Index Cond: (id = ou_2.organizational_unit_type_id)
  • Filter: (state = 'ACTIVE'::text)
267. 0.078 0.078 ↑ 1.0 1 78

Aggregate (cost=15.88..15.89 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=78)

268. 0.000 0.000 ↓ 0.0 0 78

Seq Scan on organizational_unit_tag organizational_unit_tag_2 (cost=0.00..15.88 rows=2 width=32) (actual time=0.000..0.000 rows=0 loops=78)

  • Filter: (organizational_unit_id = ou_2.id)
269. 0.078 0.234 ↑ 1.0 1 78

Aggregate (cost=3.13..3.14 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=78)

270. 0.078 0.156 ↓ 0.0 0 78

Nested Loop (cost=0.00..3.12 rows=1 width=71) (actual time=0.002..0.002 rows=0 loops=78)

  • Join Filter: (consent_item_2.consent_type_id = consent_type_2.id)
271. 0.000 0.078 ↓ 0.0 0 78

Nested Loop (cost=0.00..2.08 rows=1 width=45) (actual time=0.001..0.001 rows=0 loops=78)

  • Join Filter: (activity_type_assignment_consent_item_2.consent_item_id = consent_item_2.id)
272. 0.078 0.078 ↓ 0.0 0 78

Seq Scan on activity_type_assignment_consent_item activity_type_assignment_consent_item_2 (cost=0.00..1.01 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=78)

  • Filter: (activity_type_assignment_id = activity_type_assignment_2.id)
  • Rows Removed by Filter: 1
273. 0.000 0.000 ↓ 0.0 0

Seq Scan on consent_item consent_item_2 (cost=0.00..1.03 rows=3 width=45) (never executed)