Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Jira project statistics?

user2
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 10, 2022

To whom it may concern

I am looking how to get a Jira project size and pages. # of attachment, attachment size information. Jira is using Microsoft SQL server on-premises.

I used the script below, and I get "Invalid object name 'CONTENT'."

select count(CONTENTID) as "number of attachments", SPACES.SPACENAME from CONTENT
join SPACES on CONTENT.SPACEID = SPACES.SPACEID
where CONTENT.SPACEID is not null
and CONTENT.PREVVER is null
and CONTENT.CONTENTTYPE = 'ATTACHMENT'
group by SPACES.SPACENAME
order by "number of attachments" desc;

Thanks in advance

Barton

1 answer

3 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2022

Welcome to the Atlassian Community!

Yeah, this is another reason for not looking at any Atlassian database.  Your SQL isn't for Jira, it's for Confluence.

And it's wrong, because you're not going to get the right information from it.

Forget the database, you're wasting your time.  

For Jira attachment size, look at your server - the simplest option is to look at the size of the directory <your jira data directory>/attachments

Jira "project size" is not an easy calculation - you'd need to read every part of Jira that stories bits of issues, look at the content in there, and reverse-engineer exactly how the database stores each line in the tables in the files the database is made up of.  

user2
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2022

Thanks, Nic information. Your information was useful and helpful. 

Please advise what the story behind we could not get information from database the same as confluence.

Barton

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2022

To look at a single issue, without any custom fields, you're looking at 20-30 joins.

Don't do it.

Babs Adewole July 10, 2022

.

Suggest an answer

Log in or Sign up to answer