[Dspace-general] gathering statistics

Mark H. Wood mwood at IUPUI.Edu
Fri Sep 18 10:48:00 EDT 2009


The used space in the assetstore will come close, but will also
include extracted plain text, thumbnails, deletia, workspace, etc.
'du' may be including the sizes of the directories too.

Maybe something like this:

SELECT sum(size_bytes)
 FROM bitstream
  JOIN bundle2bitstream USING (bitstream_id)
  JOIN item2bundle USING (bundle_id)
  JOIN item USING (item_id)
 WHERE bundle_id IN (SELECT bundle_id FROM bundle WHERE name = 'ORIGINAL')
  AND NOT withdrawn;

But that could be broken by schema changes some day (for example,
DSpace 2).

-- 
Mark H. Wood, Lead System Programmer   mwood at IUPUI.Edu
Friends don't let friends publish revisable-form documents.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/dspace-general/attachments/20090918/7a8ded0b/attachment.bin


More information about the Dspace-general mailing list