データベースにクエリを実行して、スペースごとにすべてのページの下書きのサイズを調べる方法
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
要約
Confluence administrators may want to audit draft page usage on their instance.
ソリューション
The following query will identify the number of pages with a status of "draft" and the total size they take up in the database, per space:
Postgres
select
count(content.contentid) as number_of_drafts,
pg_size_pretty(sum(pg_column_size(bodycontent.body))) as total_size_of_drafts,
spaces.spacename as space_name
from bodycontent
inner join content on (content.contentid = bodycontent.contentid)
inner join spaces on (content.spaceid = spaces.spaceid)
where bodycontent.contentid in
(select contentid from CONTENT where CONTENT_STATUS = 'draft' and CONTENTTYPE = 'PAGE')
GROUP BY space_name
ORDER BY number_of_drafts DESC, space_name;MySQL
SELECT
COUNT(CONTENT.CONTENTID) AS NUMBER_OF_DRAFTS,
SUM(LENGTH(BODYCONTENT.BODY)) AS TOTAL_SIZE_OF_DRAFTS,
SPACES.SPACENAME AS SPACE_NAME
FROM BODYCONTENT
INNER JOIN CONTENT ON (CONTENT.CONTENTID = BODYCONTENT.CONTENTID)
INNER JOIN SPACES ON (CONTENT.SPACEID = SPACES.SPACEID)
WHERE BODYCONTENT.CONTENTID IN
(SELECT CONTENTID FROM CONTENT WHERE CONTENT_STATUS = 'draft' and CONTENTTYPE = 'PAGE')
GROUP BY SPACE_NAME
ORDER BY NUMBER_OF_DRAFTS DESC, SPACE_NAME;
The query above is written for PostgresSQL and MySQL databases and may require adjustment for other platforms.
更新日時: September 25, 2025
この内容はお役に立ちましたか?
さらにヘルプが必要ですか?
アトラシアン コミュニティをご利用ください。