{"id":306667,"date":"2020-07-09T09:00:29","date_gmt":"2020-07-09T09:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=306667"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=306667","title":{"rendered":"\u041a\u0443\u0434\u0430 \u0434\u0435\u043b\u043e\u0441\u044c \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Confluence? \u0418\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e Confluence \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/510236\/\">\n<p>\u0423 \u0432\u0430\u0441 \u0431\u044b\u0432\u0430\u043b\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Confluence \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u0435\u0441\u0442\u043e, \u0430 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439?<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432 \u0431\u0434 confluence.<\/p>\n<p>  <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e Confluence.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"obschiy-razmer-vseh-vlozheniy-v-confluence\">\u041e\u0431\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0441\u0435\u0445 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 Confluence:<\/h3>\n<p>  <\/p>\n<pre><code class=\"sql\">SELECT s.spaceid,        s.spacename,        sum(LONGVAL) FROM contentproperties c JOIN content co ON c.contentid = co.contentid JOIN spaces s ON co.spaceid = s.spaceid WHERE c.contentid IN     (SELECT contentid      FROM content      WHERE contenttype = 'ATTACHMENT')   AND c.propertyname = 'FILESIZE' GROUP BY s.spaceid ORDER BY SUM DESC LIMIT 5;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 (spacename \u0437\u0430\u043c\u0435\u043d\u0438\u043b):<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pc\/dp\/m8\/pcdpm8rk3wsr6sj5wqvn3lrtog8.jpeg\"><\/p>\n<p>  <\/p>\n<h3 id=\"ctranicy-s-bolshinstvom-istoricheskih-versiy-v-stechenii\">C\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432 \u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438:<\/h3>\n<p>  <\/p>\n<pre><code class=\"sql\">SELECT title,        MAX(VERSION) FROM content WHERE contenttype = 'PAGE' GROUP BY title ORDER BY 2 DESC LIMIT 5;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-n\/zs\/xd\/-nzsxd2rxvb6ch8jme-z4kkc2lc.jpeg\"><\/p>\n<p>  <\/p>\n<h3 id=\"camye-bolshie-fayly-vlozheniy-v-vashem-ekzemplyare-confluence\">C\u0430\u043c\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0432\u0430\u0448\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 Confluence<\/h3>\n<p>  <\/p>\n<pre><code class=\"sql\">SELECT DISTINCT c.contentid,                 c.title AS attachmentTitle,                 u.username AS uploadedBy,                 co.title AS pageTitle,                 cn.longval AS bytes FROM CONTENT AS c JOIN USER_MAPPING AS u ON u.user_key = c.creator JOIN CONTENT AS co ON c.pageid = co.contentid JOIN CONTENTPROPERTIES AS cn ON cn.contentid = c.contentid WHERE c.contenttype = 'ATTACHMENT'   AND cn.longval IS NOT NULL ORDER BY cn.longval DESC LIMIT 5;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qh\/3e\/wp\/qh3ewpuzbpzsfyowujsfi5smdks.jpeg\"><\/p>\n<p>  <\/p>\n<h3 id=\"kolichestvo-stranic-v-korzine-i-obschiy-razmer-stranic-v-korzine-na-prostranstvo\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u0438 \u043e\u0431\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e:<\/h3>\n<p>  <\/p>\n<pre><code class=\"sql\"> SELECT Count(content.contentid) AS number_of_trashed_pages,        Pg_size_pretty(SUM(Pg_column_size(bodycontent.BODY))) AS trash_total_size,        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 = 'deleted'        AND contenttype = 'PAGE') GROUP BY space_name ORDER BY trash_total_size LIMIT 5;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mg\/et\/n2\/mgetn2a3ofzh8pctwkei1naoj9s.jpeg\"><\/p>\n<p>  <\/p>\n<h3 id=\"obschiy-razmer-vlozheniy-zagruzhennyh-kazhdym-polzovatelem-na-vseh-stranicah\">\u041e\u0431\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445<\/h3>\n<p>  <\/p>\n<pre><code class=\"sql\">SELECT u.lower_username,        sum(cp.longval) AS &quot;size&quot; FROM content c1 JOIN content c2 ON c1.contentid = c2.pageid JOIN user_mapping u ON c1.creator=u.user_key JOIN contentproperties cp ON c2.contentid = cp.contentid WHERE c2.contenttype='ATTACHMENT' GROUP BY u.lower_username ORDER BY sum(cp.longval) DESC LIMIT 5;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ts\/jz\/hb\/tsjzhbbmzk0vcf0a2khqpljlx90.jpeg\"><\/p>\n<p>  <\/p>\n<p>P.S. \u0414\u043e\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u043f\u043e\u0441\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0434\u043b\u044f Confluence<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/510236\/\"> https:\/\/habr.com\/ru\/post\/510236\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/510236\/\">\n<p>\u0423 \u0432\u0430\u0441 \u0431\u044b\u0432\u0430\u043b\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Confluence \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u0435\u0441\u0442\u043e, \u0430 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439?<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432 \u0431\u0434 confluence.<\/p>\n<p>  <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e Confluence.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-306667","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=306667"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306667\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}