diff --git a/zack/objects-per-archive-copy.sql b/zack/objects-per-archive-copy.sql new file mode 100644 index 0000000..80615e6 --- /dev/null +++ b/zack/objects-per-archive-copy.sql @@ -0,0 +1,9 @@ +-- compute the number of objects available in each archive copy, according to +-- the content_archive table +-- +-- DB: softwareheritage-archiver + +select copies.key as archive, count(content_id) +from content_archive, jsonb_each(copies) as copies +where copies.value->>'status' = 'present' +group by copies.key;