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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Finding inactive spaces in Confluence

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

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

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

Like Julia Nunes Pedrosa likes this

The query above is incorrect. See this link for solution

0 votes
AnnWorley Atlassian Team Jan 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.

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

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

AnnWorley Atlassian Team Jan 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.

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

198 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you