Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Finding inactive spaces in Confluence

Srikanth Kola January 31, 2018

I found the below articles where you can find inactive spaces by last modified date. However a user may still use a spaces (just viewing) with out updating any contend. Any ideas on how to write a query with "last viewed date" ?

4 answers

1 accepted

1 vote
Answer accepted
Srikanth Kola February 5, 2018

Select * from [Confluence].[dbo].[SPACES] where [SPACEKEY] not in (SELECT V.[SPACE_KEY] FROM [Confluence].[dbo].[AO_92296B_AORECENTLY_VIEWED] V, [Confluence].[dbo].[SPACES] S WHERE (V.[SPACE_KEY] = S.[SPACEKEY] AND S.[SPACETYPE] = 'global') GROUP BY V.[SPACE_KEY]) AND [SPACETYPE] = 'global' order by [LASTMODDATE] ASC

Mason Crouse
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!
November 4, 2020

Hi Srikanth, probably a stupid question, but where do I run this query?

Like Julia Nunes Pedrosa likes this
1 vote
Tran Tien dung
Contributor
November 16, 2020

The query above is incorrect. See this link for solution

0 votes
Julia Nunes Pedrosa
Contributor
October 23, 2018

Hey Srikanth, can you help me? What version of Confluence are you using??

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

I do not think the database stores a record for each time a page is viewed, however, there are other options described on this page: How to Enable User Access Logging

Other than access logging the article has options for Google Analytics and the Tomcat Valve Component access log.

I look forward to hearing whether any of these work for your case.

Srikanth Kola January 31, 2018

When you go to Activity option in any space in Confluence you can see Activity of Viewing. Doesn't mean its being stored somewhere ?

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.
January 31, 2018

Yes, in a cache, which goes away after a while.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

The activity stream depends on the content index on the file system: Content Index Administration:

The content index, also called the search index, supports Confluence's search functionality. It is also used for a number of related functions such as building email threads in the mail archive, the space activity feature, and lists of recently-updated content

Also, the activity stream shows changes and not views.

Srikanth Kola February 5, 2018

I user below query to get the results, thanks for you assistance

Select * from [Confluence].[dbo].[SPACES] where [SPACEKEY] not in (SELECT V.[SPACE_KEY] FROM [Confluence].[dbo].[AO_92296B_AORECENTLY_VIEWED] V, [Confluence].[dbo].[SPACES] S WHERE (V.[SPACE_KEY] = S.[SPACEKEY] AND S.[SPACETYPE] = 'global') GROUP BY V.[SPACE_KEY]) AND [SPACETYPE] = 'global' order by [LASTMODDATE] ASC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Confluence Events