[RTFACT-18595] Improve the time/efficiency of the "Artifact Count / Size" query in the UI Created: 25/Feb/19  Updated: 05/Jun/19

Status: Open
Project: Artifactory Binary Repository
Component/s: Database
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Normal
Reporter: Ariel Seftel Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


Currently, when having a big repository with a lot of artifacts, running the "Artifact Count / Size"  count can take a while. Need to check if it's possible to improve the query in order to have better results (speed wise). 

The SQL query that is being used is in Derby:

SELECT COUNT(*) AS file_count, SUM(bin_length) AS total_size FROM nodes WHERE node_type=1 and repo = 'repoName' 


Here is an example of running the query:



Most likely that this query is related to the following factors:

  1. DB type.
  2. DB machine specs.
  3. Load on the DB at the time the query was executed. 


Generated at Tue Feb 18 08:05:31 UTC 2020 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.