How to check the depth of group nesting in Jira Server and Data Center
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
目的
Too many levels of group nesting in your Jira Server and Data Center instance can cause instance instability — including outages and noticeable performance drops under heavy load — and increase the time for directory synchronization and user authentication.
If you’re experiencing performance issues or want to make sure that you don’t exceed the recommended guardrails, check how deeply groups are nested in your system.
ソリューション
To check the depth of group nesting in your system, run the appropriate query against your database:
Run the following query if you're using PostgreSQL or MySQL:
with recursive group_hierarchy as (
select
child_id,
parent_id,
parent_name,
1 as depth_of_nested_groups
from
cwd_membership
where
cwd_membership.membership_type = 'GROUP_GROUP'
union all
select
cwd_membership.child_id,
cwd_membership.parent_id,
cwd_membership.parent_name,
depth_of_nested_groups + 1
from
cwd_membership
join group_hierarchy on
group_hierarchy.parent_id = cwd_membership.child_id
where
cwd_membership.membership_type = 'GROUP_GROUP'
)
select
*
from
group_hierarchy
Run the following query if you're using Oracle Database:
with group_hierarchy(child_id, parent_id, parent_name, depth) as (
select
child_id,
parent_id,
parent_name,
1 as depth
from
cwd_membership
where
cwd_membership.membership_type = 'GROUP_GROUP'
union all
select
cwd_membership.child_id,
cwd_membership.parent_id,
cwd_membership.parent_name,
depth + 1
from
cwd_membership
join group_hierarchy on
group_hierarchy.parent_id = cwd_membership.child_id
where
cwd_membership.membership_type = 'GROUP_GROUP'
)
select
*
from
group_hierarchy
Run the following query if you're using Microsoft SQL Server:
with group_hierarchy as (
select
child_id,
parent_id,
parent_name,
1 as depth_of_nested_groups
from
cwd_membership
where
cwd_membership.membership_type = 'GROUP_GROUP'
union all
select
cwd_membership.child_id,
cwd_membership.parent_id,
cwd_membership.parent_name,
depth_of_nested_groups + 1
from
cwd_membership
join group_hierarchy on
group_hierarchy.parent_id = cwd_membership.child_id
where
cwd_membership.membership_type = 'GROUP_GROUP'
)
select
*
from
group_hierarchy