explain.depesz.com

A tool for finding a real cause for slow queries.

Result: N5K : postgres-login

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 1.429 211.125 ↓ 20.0 961 1

HashAggregate (cost=6420.02..6420.50 rows=48 width=32) (actual time=210.442..211.125 rows=961 loops=1)

  • Join Filter: ((((operation_cluster.cluster_name)::text <> 'no_cluster'::text) AND ((operation_cluster.resource_name)::text = '*'::text) AND (operation_cluster.resource_value = '*'::text)) O
  • Total runtime: 212.895 ms
2. 127.573 209.009 ↓ 20.4 981 1

Append (cost=834.07..6419.66 rows=48 width=32) (actual time=17.590..209.009 rows=981 loops=1)

3. 2.036 37.963 ↓ 27.7 941 1

Nested Loop (cost=834.07..1127.42 rows=34 width=32) (actual time=17.588..37.963 rows=941 loops=1)

4. 4.510 27.287 ↓ 25.9 960 1

Hash Join (cost=834.07..1113.06 rows=37 width=15) (actual time=17.555..27.287 rows=960 loops=1)

  • Hash Cond: ((role.id)::text = (role_default_user.role_id)::text)
5. 5.261 5.261 ↑ 1.0 5464 1

Seq Scan on role (cost=0.00..256.21 rows=5464 width=9) (actual time=0.019..5.261 rows=5464 loops=1)

  • Filter: (NOT is_deleted)
6. 0.965 17.516 ↓ 4.2 960 1

Hash (cost=831.20..831.20 rows=229 width=33) (actual time=17.516..17.516 rows=960 loops=1)

7. 4.774 16.551 ↓ 4.2 960 1

Hash Join (cost=73.04..831.20 rows=229 width=33) (actual time=4.910..16.551 rows=960 loops=1)

  • Hash Cond: ((role_operation.role_id)::text = (role_default_user.role_id)::text)
8. 7.654 9.874 ↓ 24.5 5617 1

Bitmap Heap Scan on role_operation (cost=11.26..766.28 rows=229 width=15) (actual time=2.777..9.874 rows=5617 loops=1)

  • Recheck Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)
9. 2.220 2.220 ↓ 24.5 5617 1

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.20 rows=229 width=0) (actual time=2.220..2.220 rows=5617 loops=1)

  • Index Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_n
10. 0.778 1.903 ↓ 1.1 996 1

Hash (cost=50.88..50.88 rows=872 width=18) (actual time=1.903..1.903 rows=996 loops=1)

11. 1.125 1.125 ↓ 1.1 996 1

Seq Scan on role_default_user (cost=0.00..50.88 rows=872 width=18) (actual time=0.007..1.125 rows=996 loops=1)

  • Filter: ((default_user_class_id = 1) OR (default_user_class_id = 2))
12. 8.640 8.640 ↑ 1.0 1 960

Index Scan using project_pk on project (cost=0.00..0.38 rows=1 width=35) (actual time=0.008..0.009 rows=1 loops=960)

  • Index Cond: ((project.id)::text = (role_default_user.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text))
13. 0.001 43.473 ↓ 0.0 0 1

Nested Loop (cost=80.66..472.74 rows=1 width=32) (actual time=43.473..43.473 rows=0 loops=1)

14. 0.081 43.472 ↓ 0.0 0 1

Nested Loop (cost=80.66..445.19 rows=8 width=50) (actual time=43.472..43.472 rows=0 loops=1)

15. 0.353 2.011 ↓ 1.1 20 1

Hash Join (cost=66.30..114.27 rows=18 width=35) (actual time=1.931..2.011 rows=20 loops=1)

  • Hash Cond: ((role_default_user.project_id)::text = (project.id)::text)
16. 0.619 0.619 ↑ 1.0 498 1

Seq Scan on role_default_user (cost=0.00..45.90 rows=498 width=18) (actual time=0.006..0.619 rows=498 loops=1)

  • Filter: (default_user_class_id = 4)
17. 0.016 1.039 ↑ 1.0 20 1

Hash (cost=66.05..66.05 rows=20 width=44) (actual time=1.039..1.039 rows=20 loops=1)

18. 0.045 1.023 ↑ 1.0 20 1

Hash Join (cost=31.21..66.05 rows=20 width=44) (actual time=0.962..1.023 rows=20 loops=1)

  • Hash Cond: ((projectmembership.project_id)::text = (project.id)::text)
19. 0.050 0.050 ↑ 1.0 20 1

Index Scan using pjmb_member on projectmembership (cost=0.00..34.56 rows=20 width=9) (actual time=0.020..0.050 rows=20 loops=1)

  • Index Cond: ((member_id)::text = 'user3044'::text)
20. 0.418 0.928 ↓ 1.1 482 1

Hash (cost=25.49..25.49 rows=458 width=35) (actual time=0.928..0.928 rows=482 loops=1)

21. 0.510 0.510 ↓ 1.1 482 1

Seq Scan on project (cost=0.00..25.49 rows=458 width=35) (actual time=0.004..0.510 rows=482 loops=1)

  • Filter: ((NOT is_deleted) AND ((path)::text ~~ 'projects.%'::text))
22. 0.020 41.380 ↓ 0.0 0 20

Bitmap Heap Scan on role_operation (cost=14.35..18.37 rows=1 width=15) (actual time=2.069..2.069 rows=0 loops=20)

  • Recheck Cond: (((role_operation.role_id)::text = (role_default_user.role_id)::text) AND ((role_operation.object_type_id)::text = 'Discussion.Post'::text) AND ((role_operation.op
23. 0.040 41.360 ↓ 0.0 0 20

BitmapAnd (cost=14.35..14.35 rows=1 width=0) (actual time=2.068..2.068 rows=0 loops=20)

24. 0.260 0.260 ↑ 78.0 1 20

Bitmap Index Scan on role_oper_role_id (cost=0.00..4.35 rows=78 width=0) (actual time=0.013..0.013 rows=1 loops=20)

  • Index Cond: ((role_operation.role_id)::text = (role_default_user.role_id)::text)
25. 41.060 41.060 ↓ 24.5 5617 20

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..9.70 rows=229 width=0) (actual time=2.053..2.053 rows=5617 loops=20)

  • Index Cond: (((role_operation.object_type_id)::text = 'Discussion.Post'::text) AND ((role_operation.operation_category)::text = 'edit'::text) AND ((role_operation.op
26. 0.000 0.000 ↓ 0.0 0

Index Scan using role_pk on role (cost=0.00..3.43 rows=1 width=9) (actual time=.. rows= loops=0)

  • Index Cond: ((role.id)::text = (role_default_user.role_id)::text)
  • Filter: (NOT role.is_deleted)
27. 0.123 14.672 ↓ 40.0 40 1

Nested Loop (cost=77.65..877.49 rows=1 width=32) (actual time=12.935..14.672 rows=40 loops=1)

28. 0.118 14.229 ↓ 40.0 40 1

Nested Loop (cost=77.65..874.90 rows=1 width=15) (actual time=12.916..14.229 rows=40 loops=1)

  • Join Filter: (((role_user.project_id)::text = (role.created_in_project)::text) OR (((operation_cluster.cluster_name)::text <> 'no_cluster'::text) AND ((operation_cluster.resource_name
29. 0.138 13.751 ↓ 20.0 40 1

Nested Loop (cost=77.65..858.30 rows=2 width=55) (actual time=12.892..13.751 rows=40 loops=1)

30. 3.777 13.013 ↓ 20.0 40 1

Hash Join (cost=77.65..844.71 rows=2 width=62) (actual time=12.861..13.013 rows=40 loops=1)

  • Hash Cond: ((role_operation.role_id)::text = (role_user.role_id)::text)
31. 7.050 9.124 ↓ 24.5 5617 1

Bitmap Heap Scan on role_operation (cost=11.26..766.28 rows=229 width=44) (actual time=2.628..9.124 rows=5617 loops=1)

  • Recheck Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::text))
32. 2.074 2.074 ↓ 24.5 5617 1

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.20 rows=229 width=0) (actual time=2.074..2.074 rows=5617 loops=1)

  • Index Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::text))
33. 0.034 0.112 ↑ 1.0 40 1

Hash (cost=65.89..65.89 rows=40 width=18) (actual time=0.112..0.112 rows=40 loops=1)

34. 0.078 0.078 ↑ 1.0 40 1

Index Scan using role_user_user_id on role_user (cost=0.00..65.89 rows=40 width=18) (actual time=0.023..0.078 rows=40 loops=1)

  • Index Cond: ((user_id)::text = 'user3044'::text)
35. 0.600 0.600 ↑ 1.0 1 40

Index Scan using oper_cluster_pk on operation_cluster (cost=0.00..6.78 rows=1 width=51) (actual time=0.014..0.015 rows=1 loops=40)

  • Index Cond: ((operation_cluster.id)::text = (role_operation.cluster_id)::text)
36. 0.360 0.360 ↑ 1.0 1 40

Index Scan using role_pk on role (cost=0.00..8.27 rows=1 width=18) (actual time=0.008..0.009 rows=1 loops=40)

  • Index Cond: ((role.id)::text = (role_user.role_id)::text)
  • Filter: (NOT role.is_deleted)
37. 0.320 0.320 ↑ 1.0 1 40

Index Scan using project_pk on project (cost=0.00..2.57 rows=1 width=35) (actual time=0.008..0.008 rows=1 loops=40)

  • Index Cond: ((project.id)::text = (role_user.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text))
38. 0.002 42.142 ↓ 0.0 0 1

Nested Loop (cost=77.65..889.17 rows=1 width=32) (actual time=42.142..42.142 rows=0 loops=1)

39. 0.001 42.140 ↓ 0.0 0 1

Nested Loop (cost=77.65..880.89 rows=1 width=50) (actual time=42.140..42.140 rows=0 loops=1)

40. 17.149 42.139 ↓ 0.0 0 1

Nested Loop (cost=77.65..880.42 rows=1 width=33) (actual time=42.139..42.139 rows=0 loops=1)

  • Join Filter: (((role_user.project_id)::text = (ancestor_project.ancestor_project_id)::text) OR (((role_user.project_id)::text <> (ancestor_project.ancestor_project_id)::text) AN
41. 0.112 13.790 ↓ 40.0 40 1

Nested Loop (cost=77.65..860.92 rows=1 width=59) (actual time=12.520..13.790 rows=40 loops=1)

42. 0.138 13.358 ↓ 40.0 40 1

Nested Loop (cost=77.65..858.34 rows=1 width=33) (actual time=12.501..13.358 rows=40 loops=1)

  • Join Filter: ((((operation_cluster.cluster_name)::text <> 'no_cluster'::text) AND ((operation_cluster.resource_name)::text = '*'::text) AND (operation_cluster.resour
43. 3.715 12.620 ↓ 20.0 40 1

Hash Join (cost=77.65..844.71 rows=2 width=62) (actual time=12.472..12.620 rows=40 loops=1)

  • Hash Cond: ((role_operation.role_id)::text = (role_user.role_id)::text)
44. 6.616 8.809 ↓ 24.5 5617 1

Bitmap Heap Scan on role_operation (cost=11.26..766.28 rows=229 width=44) (actual time=2.744..8.809 rows=5617 loops=1)

  • Recheck Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::t
45. 2.193 2.193 ↓ 24.5 5617 1

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.20 rows=229 width=0) (actual time=2.193..2.193 rows=5617 loops=1)

  • Index Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit
46. 0.033 0.096 ↑ 1.0 40 1

Hash (cost=65.89..65.89 rows=40 width=18) (actual time=0.096..0.096 rows=40 loops=1)

47. 0.063 0.063 ↑ 1.0 40 1

Index Scan using role_user_user_id on role_user (cost=0.00..65.89 rows=40 width=18) (actual time=0.019..0.063 rows=40 loops=1)

  • Index Cond: ((user_id)::text = 'user3044'::text)
48. 0.600 0.600 ↑ 1.0 1 40

Index Scan using oper_cluster_pk on operation_cluster (cost=0.00..6.78 rows=1 width=51) (actual time=0.014..0.015 rows=1 loops=40)

  • Index Cond: ((operation_cluster.id)::text = (role_operation.cluster_id)::text)
49. 0.320 0.320 ↑ 1.0 1 40

Index Scan using project_pk on project project2 (cost=0.00..2.57 rows=1 width=35) (actual time=0.007..0.008 rows=1 loops=40)

  • Index Cond: ((project2.id)::text = (role_user.project_id)::text)
50. 11.200 11.200 ↑ 1.0 491 40

Seq Scan on ancestor_project (cost=0.00..10.91 rows=491 width=18) (actual time=0.001..0.280 rows=491 loops=40)

51. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pk on project (cost=0.00..0.46 rows=1 width=35) (actual time=.. rows= loops=0)

  • Index Cond: ((project.id)::text = (ancestor_project.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text))
52. 0.000 0.000 ↓ 0.0 0

Index Scan using role_pk on role (cost=0.00..8.27 rows=1 width=9) (actual time=.. rows= loops=0)

  • Index Cond: ((role.id)::text = (role_user.role_id)::text)
  • Filter: ((NOT role.is_deleted) AND (NOT role.block_recurse))
53. 42.731 42.731 ↓ 0.0 0 1

Nested Loop (cost=77.65..889.17 rows=1 width=32) (actual time=42.731..42.731 rows=0 loops=1)

54. 0.000 42.730 ↓ 0.0 0 1

Nested Loop (cost=77.65..880.89 rows=1 width=50) (actual time=42.730..42.730 rows=0 loops=1)

55. 17.267 42.728 ↓ 0.0 0 1

Nested Loop (cost=77.65..880.42 rows=1 width=33) (actual time=42.728..42.728 rows=0 loops=1)

  • Join Filter: (((role_user.project_id)::text = (ancestor_project.ancestor_project_id)::text) OR (((role_user.project_id)::text <> (ancestor_project.ancestor_project_id)::text) AN
56. 0.113 14.221 ↓ 40.0 40 1

Nested Loop (cost=77.65..860.92 rows=1 width=59) (actual time=12.950..14.221 rows=40 loops=1)

57. 0.129 13.788 ↓ 40.0 40 1

Nested Loop (cost=77.65..858.34 rows=1 width=33) (actual time=12.934..13.788 rows=40 loops=1)

  • Join Filter: ((((operation_cluster.cluster_name)::text <> 'no_cluster'::text) AND ((operation_cluster.resource_name)::text = '*'::text) AND (operation_cluster.resour
58. 3.742 13.059 ↓ 20.0 40 1

Hash Join (cost=77.65..844.71 rows=2 width=62) (actual time=12.904..13.059 rows=40 loops=1)

  • Hash Cond: ((role_operation.role_id)::text = (role_user.role_id)::text)
59. 6.646 9.214 ↓ 24.5 5617 1

Bitmap Heap Scan on role_operation (cost=11.26..766.28 rows=229 width=44) (actual time=3.119..9.214 rows=5617 loops=1)

  • Recheck Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::t
60. 2.568 2.568 ↓ 24.5 5617 1

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.20 rows=229 width=0) (actual time=2.568..2.568 rows=5617 loops=1)

  • Index Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit
61. 0.035 0.103 ↑ 1.0 40 1

Hash (cost=65.89..65.89 rows=40 width=18) (actual time=0.103..0.103 rows=40 loops=1)

62. 0.068 0.068 ↑ 1.0 40 1

Index Scan using role_user_user_id on role_user (cost=0.00..65.89 rows=40 width=18) (actual time=0.022..0.068 rows=40 loops=1)

  • Index Cond: ((user_id)::text = 'user3044'::text)
63. 0.600 0.600 ↑ 1.0 1 40

Index Scan using oper_cluster_pk on operation_cluster (cost=0.00..6.78 rows=1 width=51) (actual time=0.014..0.015 rows=1 loops=40)

  • Index Cond: ((operation_cluster.id)::text = (role_operation.cluster_id)::text)
64. 0.320 0.320 ↑ 1.0 1 40

Index Scan using project_pk on project project2 (cost=0.00..2.57 rows=1 width=35) (actual time=0.007..0.008 rows=1 loops=40)

  • Index Cond: ((project2.id)::text = (role_user.project_id)::text)
65. 11.240 11.240 ↑ 1.0 491 40

Seq Scan on ancestor_project (cost=0.00..10.91 rows=491 width=18) (actual time=0.001..0.281 rows=491 loops=40)

66. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pk on project (cost=0.00..0.46 rows=1 width=35) (actual time=.. rows= loops=0)

  • Index Cond: ((project.id)::text = (ancestor_project.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text) AND (project.project_access_level = ANY ('{1,2,3}'::integer[])))
67. 0.000 0.000 ↓ 0.0 0

Index Scan using role_pk on role (cost=0.00..8.27 rows=1 width=9) (actual time=.. rows= loops=0)

  • Index Cond: ((role.id)::text = (role_user.role_id)::text)
  • Filter: ((NOT role.is_deleted) AND role.block_recurse)
68. 0.001 13.053 ↓ 0.0 0 1

Nested Loop (cost=36.30..873.26 rows=3 width=32) (actual time=13.053..13.053 rows=0 loops=1)

69. 0.002 13.052 ↓ 0.0 0 1

Nested Loop (cost=36.30..872.00 rows=3 width=15) (actual time=13.052..13.052 rows=0 loops=1)

  • Join Filter: (((role_group.project_id)::text = (role.created_in_project)::text) OR (((operation_cluster.cluster_name)::text <> 'no_cluster'::text) AND ((operation_cluster.resource_nam
70. 0.002 13.050 ↓ 0.0 0 1

Nested Loop (cost=36.30..837.92 rows=5 width=53) (actual time=13.050..13.050 rows=0 loops=1)

71. 3.513 13.048 ↓ 0.0 0 1

Hash Join (cost=36.30..792.24 rows=7 width=62) (actual time=13.048..13.048 rows=0 loops=1)

  • Hash Cond: ((role_operation.role_id)::text = (role_group.role_id)::text)
72. 6.078 8.678 ↓ 24.5 5617 1

Bitmap Heap Scan on role_operation (cost=11.26..766.28 rows=229 width=44) (actual time=3.076..8.678 rows=5617 loops=1)

  • Recheck Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::text))
73. 2.600 2.600 ↓ 24.5 5617 1

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.20 rows=229 width=0) (actual time=2.600..2.600 rows=5617 loops=1)

  • Index Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::text))
74. 0.003 0.857 ↑ 120.0 1 1

Hash (cost=23.54..23.54 rows=120 width=18) (actual time=0.857..0.857 rows=1 loops=1)

75. 0.434 0.854 ↑ 120.0 1 1

Hash Join (cost=4.41..23.54 rows=120 width=18) (actual time=0.761..0.854 rows=1 loops=1)

  • Hash Cond: ((role_group.group_id)::text = (groupmembership.group_id)::text)
76. 0.371 0.371 ↑ 1.0 662 1

Seq Scan on role_group (cost=0.00..14.62 rows=662 width=28) (actual time=0.003..0.371 rows=662 loops=1)

77. 0.004 0.049 ↑ 2.0 1 1

Hash (cost=4.38..4.38 rows=2 width=10) (actual time=0.049..0.049 rows=1 loops=1)

78. 0.045 0.045 ↑ 2.0 1 1

Seq Scan on groupmembership (cost=0.00..4.38 rows=2 width=10) (actual time=0.008..0.045 rows=1 loops=1)

  • Filter: (((member_id)::text = 'user3044'::text) OR ((member_id)::text = 'user1001'::text))
79. 0.000 0.000 ↓ 0.0 0

Index Scan using role_pk on role (cost=0.00..6.51 rows=1 width=18) (actual time=.. rows= loops=0)

  • Index Cond: ((role.id)::text = (role_operation.role_id)::text)
  • Filter: (NOT role.is_deleted)
80. 0.000 0.000 ↓ 0.0 0

Index Scan using oper_cluster_pk on operation_cluster (cost=0.00..6.78 rows=1 width=51) (actual time=.. rows= loops=0)

  • Index Cond: ((operation_cluster.id)::text = (role_operation.cluster_id)::text)
81. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pk on project (cost=0.00..0.41 rows=1 width=35) (actual time=.. rows= loops=0)

  • Index Cond: ((project.id)::text = (role_group.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text))
82. 0.002 0.885 ↓ 0.0 0 1

Nested Loop (cost=20.72..399.59 rows=1 width=32) (actual time=0.885..0.885 rows=0 loops=1)

83. 0.001 0.883 ↓ 0.0 0 1

Nested Loop (cost=20.72..392.78 rows=1 width=61) (actual time=0.883..0.883 rows=0 loops=1)

84. 0.002 0.882 ↓ 0.0 0 1

Nested Loop (cost=20.72..392.31 rows=1 width=44) (actual time=0.882..0.882 rows=0 loops=1)

85. 0.002 0.880 ↓ 0.0 0 1

Nested Loop (cost=20.72..384.62 rows=1 width=44) (actual time=0.880..0.880 rows=0 loops=1)

86. 0.007 0.878 ↓ 0.0 0 1

Nested Loop (cost=4.41..221.91 rows=8 width=27) (actual time=0.878..0.878 rows=0 loops=1)

87. 0.442 0.855 ↑ 120.0 1 1

Hash Join (cost=4.41..23.54 rows=120 width=18) (actual time=0.763..0.855 rows=1 loops=1)

  • Hash Cond: ((role_group.group_id)::text = (groupmembership.group_id)::text)
88. 0.361 0.361 ↑ 1.0 662 1

Seq Scan on role_group (cost=0.00..14.62 rows=662 width=28) (actual time=0.002..0.361 rows=662 loops=1)

89. 0.003 0.052 ↑ 2.0 1 1

Hash (cost=4.38..4.38 rows=2 width=10) (actual time=0.052..0.052 rows=1 loops=1)

90. 0.049 0.049 ↑ 2.0 1 1

Seq Scan on groupmembership (cost=0.00..4.38 rows=2 width=10) (actual time=0.007..0.049 rows=1 loops=1)

  • Filter: (((member_id)::text = 'user3044'::text) OR ((member_id)::text = 'user1001'::text))
91. 0.016 0.016 ↓ 0.0 0 1

Index Scan using role_pk on role (cost=0.00..1.64 rows=1 width=9) (actual time=0.016..0.016 rows=0 loops=1)

  • Index Cond: ((role.id)::text = (role_group.role_id)::text)
  • Filter: ((NOT role.is_deleted) AND (NOT role.block_recurse))
92. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on role_operation (cost=16.31..20.33 rows=1 width=44) (actual time=.. rows= loops=0)

  • Recheck Cond: (((role_operation.role_id)::text = (role_group.role_id)::text) AND ((role_operation.object_type_id)::text = 'Discussion.Post'::text) AND ((role_operati
93. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=16.31..16.31 rows=1 width=0) (actual time=.. rows= loops=0)

94. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on role_oper_role_id (cost=0.00..4.90 rows=78 width=0) (actual time=.. rows= loops=0)

  • Index Cond: ((role_operation.role_id)::text = (role_group.role_id)::text)
95. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.10 rows=229 width=0) (actual time=.. rows= loops=0)

  • Index Cond: (((role_operation.object_type_id)::text = 'Discussion.Post'::text) AND ((role_operation.operation_category)::text = 'edit'::text) AND ((role_
96. 0.000 0.000 ↓ 0.0 0

Index Scan using project_ancestor_project_idx on ancestor_project (cost=0.00..5.64 rows=164 width=18) (actual time=.. rows= loops=0)

  • Index Cond: ((ancestor_project.ancestor_project_id)::text = (role_group.project_id)::text)
97. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pk on project (cost=0.00..0.46 rows=1 width=35) (actual time=.. rows= loops=0)

  • Index Cond: ((project.id)::text = (ancestor_project.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text))
98. 0.000 0.000 ↓ 0.0 0

Index Scan using oper_cluster_pk on operation_cluster (cost=0.00..6.78 rows=1 width=51) (actual time=.. rows= loops=0)

  • Index Cond: ((operation_cluster.id)::text = (role_operation.cluster_id)::text)
99. 0.001 13.003 ↓ 0.0 0 1

Nested Loop (cost=53.34..890.34 rows=6 width=32) (actual time=13.003..13.003 rows=0 loops=1)

100. 0.700 13.002 ↓ 0.0 0 1

Hash Join (cost=53.34..885.60 rows=10 width=15) (actual time=13.002..13.002 rows=0 loops=1)

  • Hash Cond: ((role_group.project_id)::text = (ancestor_project.ancestor_project_id)::text)
101. 0.002 12.302 ↓ 0.0 0 1

Nested Loop (cost=36.30..866.04 rows=4 width=15) (actual time=12.302..12.302 rows=0 loops=1)

102. 0.001 12.300 ↓ 0.0 0 1

Nested Loop (cost=36.30..839.93 rows=4 width=33) (actual time=12.300..12.300 rows=0 loops=1)

  • Join Filter: ((((operation_cluster.cluster_name)::text <> 'no_cluster'::text) AND ((operation_cluster.resource_name)::text = '*'::text) AND (operation_cluster.resource_val
103. 3.523 12.299 ↓ 0.0 0 1

Hash Join (cost=36.30..792.24 rows=7 width=62) (actual time=12.299..12.299 rows=0 loops=1)

  • Hash Cond: ((role_operation.role_id)::text = (role_group.role_id)::text)
104. 6.048 7.939 ↓ 24.5 5617 1

Bitmap Heap Scan on role_operation (cost=11.26..766.28 rows=229 width=44) (actual time=2.364..7.939 rows=5617 loops=1)

  • Recheck Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::text))
105. 1.891 1.891 ↓ 24.5 5617 1

Bitmap Index Scan on role_oper_obj_oper (cost=0.00..11.20 rows=229 width=0) (actual time=1.891..1.891 rows=5617 loops=1)

  • Index Cond: (((object_type_id)::text = 'Discussion.Post'::text) AND ((operation_category)::text = 'edit'::text) AND ((operation_name)::text = 'edit'::tex
106. 0.002 0.837 ↑ 120.0 1 1

Hash (cost=23.54..23.54 rows=120 width=18) (actual time=0.837..0.837 rows=1 loops=1)

107. 0.426 0.835 ↑ 120.0 1 1

Hash Join (cost=4.41..23.54 rows=120 width=18) (actual time=0.744..0.835 rows=1 loops=1)

  • Hash Cond: ((role_group.group_id)::text = (groupmembership.group_id)::text)
108. 0.364 0.364 ↑ 1.0 662 1

Seq Scan on role_group (cost=0.00..14.62 rows=662 width=28) (actual time=0.002..0.364 rows=662 loops=1)

109. 0.004 0.045 ↑ 2.0 1 1

Hash (cost=4.38..4.38 rows=2 width=10) (actual time=0.045..0.045 rows=1 loops=1)

110. 0.041 0.041 ↑ 2.0 1 1

Seq Scan on groupmembership (cost=0.00..4.38 rows=2 width=10) (actual time=0.005..0.041 rows=1 loops=1)

  • Filter: (((member_id)::text = 'user3044'::text) OR ((member_id)::text = 'user1001'::text))
111. 0.000 0.000 ↓ 0.0 0

Index Scan using oper_cluster_pk on operation_cluster (cost=0.00..6.78 rows=1 width=51) (actual time=.. rows= loops=0)

  • Index Cond: ((operation_cluster.id)::text = (role_operation.cluster_id)::text)
112. 0.000 0.000 ↓ 0.0 0

Index Scan using role_pk on role (cost=0.00..6.51 rows=1 width=9) (actual time=.. rows= loops=0)

  • Index Cond: ((role.id)::text = (role_group.role_id)::text)
  • Filter: ((NOT role.is_deleted) AND role.block_recurse)
113. 0.364 0.687 ↑ 1.0 491 1

Hash (cost=10.91..10.91 rows=491 width=18) (actual time=0.687..0.687 rows=491 loops=1)

114. 0.323 0.323 ↑ 1.0 491 1

Seq Scan on ancestor_project (cost=0.00..10.91 rows=491 width=18) (actual time=0.003..0.323 rows=491 loops=1)

115. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pk on project (cost=0.00..0.46 rows=1 width=35) (actual time=.. rows= loops=0)

  • Index Cond: ((project.id)::text = (ancestor_project.project_id)::text)
  • Filter: ((NOT project.is_deleted) AND ((project.path)::text ~~ 'projects.%'::text) AND (project.project_access_level = ANY ('{1,2,3}'::integer[])))