Hi Paul,

I'm somewhat working on usage visualization as well, and have used some
Google Charts to display our repository growth:
[image: dspace-statistics.png]
https://picasaweb.google.com/pdietz84/OSULibrariesDSpaceDesigns#5572201645324819106

The two queries that I'm using to do this is an aggregate cumulate number of
bitstreams (in the Original bundle, as we don't care about licenses or
thumbnails), and then a super-query that wraps around that to give me a
monthly breakdown.

For starters, here are the SQL queries I consider to be very useful. I don't
claim full credit for the monthly breakdown, someone else in the community
created it.
SELECT
  *
FROM
  public.bitstream,
  public.bundle2bitstream,
  public.bundle,
  public.item,
  public.item2bundle,
  public.metadatavalue
WHERE
  bundle2bitstream.bitstream_id = bitstream.bitstream_id AND
  bundle.bundle_id = bundle2bitstream.bundle_id AND
  item.item_id = item2bundle.item_id AND
  item2bundle.bundle_id = bundle.bundle_id AND
  metadatavalue.item_id = item.item_id AND
  bundle."name" = 'ORIGINAL' AND
  item.in_archive = TRUE AND
  metadatavalue.metadata_field_id = 12;



And then to get a monthly breakdown of this data:

SELECT to_char(date_trunc('month', t1.ts), 'YYYY-MM') AS month, count(*)
FROM
(
SELECT
  to_timestamp(metadatavalue.text_value, 'YYYY-MM-DD') AS ts
 FROM
  public.bitstream,
  public.bundle2bitstream,
   public.bundle,
  public.item,
  public.item2bundle,
   public.metadatavalue
WHERE
  bundle2bitstream.bitstream_id = bitstream.bitstream_id AND
   bundle.bundle_id = bundle2bitstream.bundle_id AND
  item.item_id = item2bundle.item_id AND
  item2bundle.bundle_id = bundle.bundle_id AND
   metadatavalue.item_id = item.item_id AND
  bundle."name" = 'ORIGINAL' AND
  item.in_archive = TRUE AND
   metadatavalue.metadata_field_id = 12
) t1
GROUP BY date_trunc('month', t1.ts)
order by month desc;

<https://picasaweb.google.com/pdietz84/OSULibrariesDSpaceDesigns#5572201645324819106>
Peter Dietz



On Mon, Apr 18, 2011 at 1:29 PM, Paul Go <[email protected]> wrote:

>
> We are trying to get a count of all of the files in our Dspace instance.
>  Not just the number of submissions since each can hold multiple files.  Is
> there a simple way to do this?
>
> Thank you in advance.
>
> Paul Go
>
> Systems Librarian /
> Library Technology Manager
> Paul V. Galvin Library
> 35 West 33rd Street
> Chicago, IL  60616
> 312.567.7997
> [email protected]
>
>
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> Dspace-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-general
>
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to