explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U2ie

Settings
# exclusive inclusive rows x rows loops node
1. 2.104 426.307 ↑ 1.0 1 1

Result (cost=107,337.53..107,337.54 rows=1 width=32) (actual time=426.307..426.307 rows=1 loops=1)

2.          

CTE matches

3. 0.014 0.097 ↓ 3.4 24 1

Hash Join (cost=5.97..14.52 rows=7 width=46) (actual time=0.087..0.097 rows=24 loops=1)

  • Hash Cond: (user_media_offline.media_id = media.id)
4. 0.028 0.028 ↑ 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.025..0.028 rows=27 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
6. 0.042 0.042 ↓ 2.0 46 1

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

  • Filter: ((state = 'ACTIVE'::text) AND (lifecycle_status = 'ACTIVE'::text))
  • Rows Removed by Filter: 48
7.          

CTE view

8. 0.037 0.141 ↓ 3.4 24 1

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

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

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

10.          

Initplan (forResult)

11. 120.351 424.203 ↑ 1.0 1 1

Aggregate (cost=107,322.75..107,322.76 rows=1 width=32) (actual time=424.203..424.203 rows=1 loops=1)

12. 0.026 303.852 ↓ 3.4 24 1

Nested Loop Left Join (cost=15,327.70..107,322.73 rows=7 width=80) (actual time=38.736..303.852 rows=24 loops=1)

13. 0.154 0.154 ↓ 3.4 24 1

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

14. 0.672 303.672 ↑ 1.0 1 24

Nested Loop Left Join (cost=15,327.70..15,331.79 rows=1 width=48) (actual time=12.650..12.653 rows=1 loops=24)

15. 0.024 298.080 ↑ 1.0 1 24

Nested Loop Left Join (cost=15,257.02..15,260.58 rows=1 width=290) (actual time=12.417..12.420 rows=1 loops=24)

16. 0.048 293.784 ↑ 1.0 1 24

Nested Loop Left Join (cost=15,046.81..15,050.34 rows=1 width=258) (actual time=12.238..12.241 rows=1 loops=24)

17. 0.048 288.528 ↑ 1.0 1 24

Nested Loop Left Join (cost=14,780.19..14,783.69 rows=1 width=226) (actual time=12.020..12.022 rows=1 loops=24)

18. 0.024 0.576 ↑ 1.0 1 24

Nested Loop Left Join (cost=5.95..9.42 rows=1 width=194) (actual time=0.023..0.024 rows=1 loops=24)

19. 0.096 0.096 ↑ 1.0 1 24

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

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

Limit (cost=5.81..5.81 rows=1 width=52) (actual time=0.018..0.019 rows=1 loops=24)

21. 0.096 0.432 ↑ 2.0 1 24

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

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

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

  • Filter: (media_id = vm.id)
  • Rows Removed by Filter: 142
23. 1.488 287.904 ↑ 1.0 1 24

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

24. 0.093 286.416 ↑ 1.3 3 24

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

25. 0.102 0.456 ↑ 1.3 3 24

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

  • Hash Cond: (key_message.id = key_message_1.id)
26. 0.066 0.066 ↑ 1.0 13 22

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

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

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

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

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

  • Hash Cond: (key_message_1.id = media_key_message.key_message_id)
29. 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)

30. 0.048 0.120 ↑ 1.3 3 24

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.072 0.072 ↑ 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.003..0.003 rows=3 loops=24)

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

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

33. 0.069 0.276 ↑ 1.0 1 69

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

34. 0.138 0.138 ↑ 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.002 rows=1 loops=69)

  • Index Cond: (key_message.id = id)
  • Filter: (state <> 'DELETED'::text)
35. 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
36. 1.449 285.177 ↑ 1.0 1 69

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

37. 0.138 283.728 ↑ 1.0 6 69

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

38. 0.483 1.242 ↑ 1.0 6 69

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

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

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

  • Filter: (state <> 'DELETED'::text)
40. 0.069 0.552 ↑ 1.0 6 69

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
41. 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
42. 1.656 282.348 ↑ 1.0 1 414

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

43. 0.828 0.828 ↑ 1.0 1 414

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=414)

  • Index Cond: (id = topic.id)
  • Filter: (state <> 'DELETED'::text)
44. 8.694 277.380 ↑ 1.0 1 414

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

45. 6.624 268.686 ↓ 1.7 12 414

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

  • Join Filter: (activity_type.id = activity_type_1.id)
  • Rows Removed by Join Filter: 66
46. 2.070 262.062 ↓ 1.7 12 414

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

47. 2.472 6.624 ↓ 1.7 12 414

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

  • Hash Cond: (topic_activity_type.activity_type_id = activity_type.id)
48. 4.140 4.140 ↓ 1.5 12 414

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
50. 0.007 0.007 ↓ 1.1 13 1

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

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

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

52. 4.968 233.496 ↑ 1.0 1 4,968

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

53. 4.968 129.168 ↑ 1.0 1 4,968

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

54. 4.968 109.296 ↑ 1.0 1 4,968

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

55. 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.id = touch_point_group_1.id)
  • Rows Removed by Join Filter: 4
56. 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.008..0.009 rows=1 loops=4,968)

  • Join Filter: (touch_point_group.id = at.touch_point_group_id)
  • Rows Removed by Join Filter: 2
57. 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)

58. 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)

59. 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)

60. 9.936 9.936 ↑ 1.0 1 4,968

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=4,968)

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

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=4,968)

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

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=4,968)

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

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=4,968)

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

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

  • Filter: (state <> 'DELETED'::text)
65. 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_1.id, (array_length(COALESCE(array_agg(activity_type_5.id), '{}'::uuid[]), 1))
66. 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_1.id, (array_length(COALESCE(array_agg(activity_type_5.id), '{}'::uuid[]), 1))
  • Sort Method: quicksort Memory: 25kB
67. 0.006 0.028 ↑ 1.0 5 1

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

68. 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)
69. 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)

70. 0.010 0.010 ↑ 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.002 rows=2 loops=5)

  • Filter: ((touch_point_group_id = touch_point_group_1.id) AND (state = 'ACTIVE'::text))
  • Rows Removed by Filter: 11
71. 29.808 39.744 ↑ 1.0 1 4,968

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

72. 9.936 9.936 ↑ 1.0 1 4,968

Seq Scan on activity_type_rule (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.id)
  • Rows Removed by Filter: 12
73. 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)

74. 0.000 4.968 ↓ 0.0 0 4,968

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=4,968)

  • Recheck Cond: (activity_type_id = at.id)
75. 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.id)
76. 14.904 99.360 ↑ 1.0 1 4,968

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

77. 4.968 84.456 ↑ 1.0 1 4,968

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

78. 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)

79. 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)

80. 9.936 9.936 ↑ 1.0 1 4,968

Seq Scan on activity_type_assignment (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.id)
  • Rows Removed by Filter: 12
81. 9.936 9.936 ↑ 1.0 1 4,968

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=4,968)

  • Index Cond: (id = activity_type_assignment.organizational_unit_id)
  • Filter: (state <> 'DELETED'::text)
82. 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)

83. 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)

84. 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)

85. 9.936 9.936 ↑ 1.0 1 4,968

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=4,968)

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

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=4,968)

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

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=4,968)

  • Index Cond: (id = ou.organizational_unit_type_id)
  • Filter: (state = 'ACTIVE'::text)
88. 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)

89. 0.000 0.000 ↓ 0.0 0 4,968

Seq Scan on organizational_unit_tag (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.id)
90. 4.968 14.904 ↑ 1.0 1 4,968

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

91. 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.consent_type_id = consent_type.id)
  • Rows Removed by Join Filter: 0
92. 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.consent_item_id = consent_item.id)
93. 4.968 4.968 ↓ 0.0 0 4,968

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=4,968)

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

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

95. 0.414 0.414 ↑ 1.0 2 414

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

96. 4.968 9.936 ↑ 1.0 1 4,968

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

97. 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)

98. 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)

99. 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_1.id = activity_type_comment_type.comment_type_id)
100. 0.000 0.000 ↓ 0.0 0 4,968

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=4,968)

101. 0.000 0.000 ↓ 0.0 0

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

102. 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)
103. 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)
104. 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)
105. 0.000 0.000 ↓ 0.0 0

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

106. 0.000 0.000 ↓ 0.0 0

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

107. 0.000 0.000 ↓ 0.0 0

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

108. 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)
109. 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
110. 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
111. 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
112. 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)

113. 0.003 0.003 ↑ 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.003 rows=12 loops=1)

114.          

SubPlan (forNested Loop Left Join)

115. 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.id = template_topic.template_id)
116. 0.276 0.276 ↑ 2.5 4 138

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

  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 6
117. 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
118. 0.828 0.828 ↑ 1.0 2 414

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

  • Filter: (t.id = topic_id)
  • Rows Removed by Filter: 13
119. 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)
120. 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)

121. 0.000 0.000 ↓ 0.0 0

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

122. 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)
123. 0.168 5.208 ↑ 1.0 1 24

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

124. 0.312 5.040 ↑ 1.0 3 24

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

  • Join Filter: (activity_type_6.id = activity_type_7.id)
  • Rows Removed by Join Filter: 39
125. 0.048 0.048 ↑ 1.0 13 24

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

126. 0.000 4.680 ↑ 1.0 3 312

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

127. 0.060 4.704 ↑ 1.0 3 24

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

128. 0.096 0.432 ↑ 1.0 3 24

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

  • Merge Cond: (activity_type_6.id = media_activity_type.activity_type_id)
129. 0.168 0.240 ↑ 1.0 12 24

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

  • Sort Key: activity_type_6.id
  • Sort Method: quicksort Memory: 26kB
130. 0.072 0.072 ↓ 1.1 13 24

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

  • Filter: (state <> 'DELETED'::text)
131. 0.096 0.096 ↑ 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.003..0.004 rows=3 loops=24)

  • Index Cond: (media_id = vm.id)
  • Heap Fetches: 0
132. 0.078 4.212 ↑ 1.0 1 78

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

133. 0.078 3.900 ↑ 1.0 1 78

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

134. 0.078 2.184 ↑ 1.0 1 78

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

135. 0.156 1.872 ↑ 1.0 1 78

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

136. 0.078 1.014 ↑ 1.0 1 78

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

  • Join Filter: (touch_point_group_2.id = touch_point_group_3.id)
  • Rows Removed by Join Filter: 4
137. 0.078 0.702 ↑ 1.0 1 78

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

  • Join Filter: (touch_point_group_2.id = at_1.touch_point_group_id)
138. 0.078 0.546 ↑ 1.0 1 78

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

139. 0.000 0.390 ↑ 1.0 1 78

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

140. 0.078 0.312 ↑ 1.0 1 78

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

141. 0.156 0.156 ↑ 1.0 1 78

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=78)

  • Index Cond: (id = activity_type_6.id)
142. 0.078 0.078 ↑ 1.0 1 78

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=78)

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

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=78)

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

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=78)

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

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=1 loops=78)

  • Filter: (state <> 'DELETED'::text)
146. 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_3.id, (array_length(COALESCE(array_agg(activity_type_11.id), '{}'::uuid[]), 1))
147. 0.053 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_3.id, (array_length(COALESCE(array_agg(activity_type_11.id), '{}'::uuid[]), 1))
  • Sort Method: quicksort Memory: 25kB
148. 0.002 0.025 ↑ 1.0 5 1

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

149. 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)
150. 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)

151. 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
152. 0.546 0.702 ↑ 1.0 1 78

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

153. 0.156 0.156 ↑ 1.0 1 78

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=78)

  • Filter: (activity_type_id = at_1.id)
  • Rows Removed by Filter: 12
154. 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)

155. 0.000 0.078 ↓ 0.0 0 78

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=78)

  • Recheck Cond: (activity_type_id = at_1.id)
156. 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_1.id)
157. 0.234 1.638 ↑ 1.0 1 78

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

158. 0.078 1.404 ↑ 1.0 1 78

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

159. 0.078 1.092 ↑ 1.0 1 78

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

160. 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)

161. 0.156 0.156 ↑ 1.0 1 78

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=78)

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

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=78)

  • Index Cond: (id = activity_type_assignment_1.organizational_unit_id)
  • Filter: (state <> 'DELETED'::text)
163. 0.078 0.624 ↑ 1.0 1 78

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

164. 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)

165. 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)

166. 0.156 0.156 ↑ 1.0 1 78

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=78)

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

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=78)

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

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=78)

  • Index Cond: (id = ou_1.organizational_unit_type_id)
  • Filter: (state = 'ACTIVE'::text)
169. 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)

170. 0.000 0.000 ↓ 0.0 0 78

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=78)

  • Filter: (organizational_unit_id = ou_1.id)
171. 0.156 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)

172. 0.000 0.078 ↓ 0.0 0 78

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

  • Join Filter: (consent_item_1.consent_type_id = consent_type_1.id)
173. 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_1.consent_item_id = consent_item_1.id)
174. 0.078 0.078 ↓ 0.0 0 78

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=78)

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

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

176. 0.000 0.000 ↓ 0.0 0

Seq Scan on consent_type consent_type_1 (cost=0.00..1.02 rows=2 width=42) (never executed)

177. 0.156 0.234 ↑ 1.0 1 78

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

178. 0.000 0.078 ↓ 0.0 0 78

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

179. 0.078 0.078 ↓ 0.0 0 78

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

180. 0.000 0.000 ↓ 0.0 0 78

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

  • Hash Cond: (comment_type_6.id = activity_type_comment_type_1.comment_type_id)
181. 0.000 0.000 ↓ 0.0 0 78

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=78)

182. 0.000 0.000 ↓ 0.0 0

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

183. 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)
184. 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)
185. 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)
186. 0.000 0.000 ↓ 0.0 0

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

187. 0.000 0.000 ↓ 0.0 0

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

188. 0.000 0.000 ↓ 0.0 0

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

189. 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)
190. 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
191. 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
192. 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
193. 0.336 4.272 ↑ 1.0 1 24

Aggregate (cost=210.22..210.23 rows=1 width=32) (actual time=0.178..0.178 rows=1 loops=24)

194. 0.110 3.936 ↑ 1.7 6 24

Nested Loop Left Join (cost=37.01..210.19 rows=10 width=68) (actual time=0.031..0.164 rows=6 loops=24)

195. 0.960 2.832 ↑ 1.7 6 24

Hash Join (cost=20.60..42.58 rows=10 width=52) (actual time=0.021..0.118 rows=6 loops=24)

  • Hash Cond: (organizational_unit_2.id = media_assignment.organizational_unit_id)
196. 1.656 1.656 ↑ 1.0 460 24

Seq Scan on organizational_unit organizational_unit_2 (cost=0.00..20.76 rows=460 width=29) (actual time=0.001..0.069 rows=460 loops=24)

  • Filter: (state <> 'DELETED'::text)
  • Rows Removed by Filter: 1
197. 0.048 0.216 ↑ 1.7 6 24

Hash (cost=20.48..20.48 rows=10 width=39) (actual time=0.009..0.009 rows=6 loops=24)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
198. 0.072 0.168 ↑ 1.7 6 24

Bitmap Heap Scan on media_assignment (cost=4.35..20.48 rows=10 width=39) (actual time=0.006..0.007 rows=6 loops=24)

  • Recheck Cond: (media_id = vm.id)
  • Heap Blocks: exact=27
199. 0.096 0.096 ↑ 1.7 6 24

Bitmap Index Scan on media_assignment_pkey (cost=0.00..4.35 rows=10 width=0) (actual time=0.004..0.004 rows=6 loops=24)

  • Index Cond: (media_id = vm.id)
200. 0.142 0.994 ↑ 1.0 1 142

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

201. 0.000 0.710 ↑ 1.0 1 142

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

202. 0.142 0.568 ↑ 1.0 1 142

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

203. 0.284 0.284 ↑ 1.0 1 142

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=142)

  • Index Cond: (organizational_unit_2.id = id)
  • Filter: (state <> 'DELETED'::text)
204. 0.142 0.142 ↑ 1.0 1 142

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=142)

  • Index Cond: (id = ou_2.organizational_hierarchy_id)
  • Filter: (state = 'ACTIVE'::text)
205. 0.142 0.142 ↑ 1.0 1 142

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=142)

  • Index Cond: (id = ou_2.organizational_unit_type_id)
  • Filter: (state = 'ACTIVE'::text)
206. 0.142 0.142 ↑ 1.0 1 142

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

207. 0.000 0.000 ↓ 0.0 0 142

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=142)

  • Filter: (organizational_unit_id = ou_2.id)
208. 0.384 4.920 ↑ 1.0 1 24

Aggregate (cost=70.67..70.68 rows=1 width=32) (actual time=0.205..0.205 rows=1 loops=24)

209. 0.117 4.536 ↓ 1.2 5 24

Nested Loop Left Join (cost=12.22..69.66 rows=4 width=64) (actual time=0.086..0.189 rows=5 loops=24)

210. 0.051 3.864 ↓ 1.2 5 24

Nested Loop Left Join (cost=11.80..66.47 rows=4 width=48) (actual time=0.075..0.161 rows=5 loops=24)

211. 0.984 3.480 ↓ 1.2 5 24

Hash Right Join (cost=11.38..35.36 rows=4 width=48) (actual time=0.069..0.145 rows=5 loops=24)

  • Hash Cond: (sec_user.id = media_change_reason.rec_editor)
212. 1.824 1.824 ↑ 1.0 434 24

Seq Scan on sec_user (cost=0.00..20.69 rows=434 width=32) (actual time=0.001..0.076 rows=434 loops=24)

  • Filter: (state <> 'DELETED'::text)
  • Rows Removed by Filter: 21
213. 0.048 0.672 ↓ 1.2 5 24

Hash (cost=11.32..11.32 rows=4 width=48) (actual time=0.028..0.028 rows=5 loops=24)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
214. 0.624 0.624 ↓ 1.2 5 24

Seq Scan on media_change_reason (cost=0.00..11.32 rows=4 width=48) (actual time=0.005..0.026 rows=5 loops=24)

  • Filter: (media_id = vm.id)
  • Rows Removed by Filter: 341
215. 0.333 0.333 ↑ 1.0 1 111

Index Scan using pk_person on person (cost=0.42..7.78 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=111)

  • Index Cond: (id = sec_user.person_id)
  • Filter: (state <> 'DELETED'::text)
216. 0.555 0.555 ↑ 1.0 1 111

Index Scan using pk_person on person person_1 (cost=0.42..0.80 rows=1 width=48) (actual time=0.005..0.005 rows=1 loops=111)

  • Index Cond: (person.id = id)
Planning time : 17.178 ms
Execution time : 427.539 ms