I'm sure this has been done before but I couldn't find exactly what I need on the KC. I need to determine the total size of all content under a particular folder and subfolders. What's the easiest way to do this?
Something like this will give you the count of the files and the size in MB of the
current version of everything in a folder. Then modify to also include a ‘grand total’ if you want only the total size of everything
it is Oracle specific.
>
> SELECT COUNT(d3.docid) AS "Number of Docs",
> SUM(d3.datasize) /(1024 *1024) "Megabytes"
> FROM dtree d1,
> dtree d2 ,
> dversdata d3
> WHERE d1.dataid = d3.docid
> AND d1.versionnum = d3.version
> AND d1.parentid = d2.dataid
> AND d1.subtype IN(0, 144)
> AND d1.dataid IN
> (SELECT dataid
> FROM dtree START
> WITH dataid = <objid> CONNECT BY PRIOR dataid = ABS(parentid)
From: eLink Entry: Content Server LiveReports Forum [mailto:livereportsdiscussion@elinkkc.opentext.com]Sent: Thursday, March 14, 2013 5:07 AMTo: eLink RecipientSubject: Total size of all content under a folder
Total size of all content under a folder
Posted byric.pike@lmco.com (Pike, Ric) On 03-14-2013 05:04
[To post a comment, use the normal reply function]
Forum:
Content Server LiveReports Forum
Content Server:
Knowledge Center
Excellent. Thanks. I need to include all versions. How would I modify it for that?
Remove this part of the where clause
AND d1.versionnum = d3.version
From: eLink Entry: Content Server LiveReports Forum [mailto:livereportsdiscussion@elinkkc.opentext.com]Sent: 2013 March 14, Thu 14:07To: eLink RecipientSubject: RE Total size of all content under a folder
RE Total size of all content under a folder
Posted byric.pike@lmco.com (Pike, Ric) On 03-14-2013 09:59
Topic:
Is it anymore performant to use the DTREEANCESTORS table for this to remove the CONNECT BY PRIOR ?