How to find pages with the most child pages

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: 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 は除く

目的

Some actions, such as moving a page, can take a long time when the page has a very large number of child pages. For this reason it can be useful to identify pages with a very large number of children and, if necessary, break up the page hierarchy into smaller page trees. 

ソリューション

The following query will return details of the 50 pages with the most direct child pages. 

select contentid, title, count from content join (select parentid, count(*) from content 
where contenttype = 'PAGE' and content_status = 'current' 
group by parentid 
order by count desc limit 50) 
top on top.parentid = content.contentid;

This query has been tested with PostgreSQL, and may need to be adapted for your database. 


説明 How to find pages with the most child pages
製品Confluence
最終更新日: 2022 年 2 月 7 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.