softwareheritage-indexer=> select count(*) from content_fossology_license;
now | count
------------------------------- | ------------
2021-02-22 10:55:14.408757+00 | 4459106964
(1 row)
softwareheritage-indexer=> select c.id, l.name, i.tool_name, i.tool_version from content_fossology_license c inner join fossology_license l on l.id=c.license_id inner join indexer_configuration i on c.indexer_configuration_id=i.id limit 10;
id | name | tool_name | tool_version
--------------------------------------------+------------------+-----------+----------------------
\x1d4179dd410695a4efd7085bd46d99d2cecacabd | Apache-2.0 | nomos | 3.1.0rc2-31-ga2cbb8c
\xe97666f51db93f52dd0370153934b25e38275ee8 | Apache-2.0 | nomos | 3.1.0rc2-31-ga2cbb8c
\xa43dd4e11cae5655ed72484afdb1f1bb7790200a | No_license_found | nomos | 3.1.0rc2-31-ga2cbb8c
\xe2b54b6489068cd90957f7c89d2d7b4916dfba92 | See-URL | nomos | 3.1.0rc2-31-ga2cbb8c
\x4f8ca39b4361ffc5d408279f243bdbec2567bd1f | No_license_found | nomos | 3.1.0rc2-31-ga2cbb8c
\xfd0802537227d9e1b5edaeec22973ed900b13f08 | MIT | nomos | 3.1.0rc2-31-ga2cbb8c
\xfd0802537227d9e1b5edaeec22973ed900b13f08 | MIT-style | nomos | 3.1.0rc2-31-ga2cbb8c
\xb65414a95b075577418c0f3612ab5984cdabb9d1 | No_license_found | nomos | 3.1.0rc2-31-ga2cbb8c
\x52988bb3d56e53c6379bc285df72e9e936125767 | No_license_found | nomos | 3.1.0rc2-31-ga2cbb8c
\xda059669b895b11a8ba44189be4bbde2b2aebf47 | Apache-2.0 | nomos | 3.1.0rc2-31-ga2cbb8c
(10 rows)
softwareheritage-indexer=> explain select l.name, count(*) from content_fossology_license c inner join fossology_license l on l.id=c.license_id group by l.name;
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------
Finalize GroupAggregate (cost=66600930.02..66601141.57 rows=835 width=40)
Group Key: l.name
-> Gather Merge (cost=66600930.02..66601124.87 rows=1670 width=40)
Workers Planned: 2
-> Sort (cost=66599930.00..66599932.09 rows=835 width=40)
Sort Key: l.name
-> Partial HashAggregate (cost=66599881.13..66599889.48 rows=835 width=40)
Group Key: l.name
-> Hash Join (cost=23.79..57315367.32 rows=1856902761 width=32)
Hash Cond: (c.license_id = l.id)
-> Parallel Seq Scan on content_fossology_license c (cost=0.00..52416233.61 rows=1856902761 width=2)
-> Hash (cost=13.35..13.35 rows=835 width=34)
-> Seq Scan on fossology_license l (cost=0.00..13.35 rows=835 width=34)
(13 rows)
softwareheritage-indexer=> select l.name, count(*) from content_fossology_license c inner join fossology_license l on l.id=c.license_id group by l.name;