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

Using Bob Swift Cache with Run Self-Service Reports

Kevin Tracy May 2, 2016

Hi,

We use Bob Swift's Run extensively and we are trying to now implement the Cache plugin to reduce database load and db connection issues.

I have tried embedding the sql-query macro inside the Cache macro using a dummy query that takes about 30 seconds to run. The assumption is that after the first run, the table will render instantly upon refresh. But it is taking the full 30s every time.

Interestingly, I have the showDate set to True, and the date of the render at the top will stay unchanged, yet the query still seems to still take the full amount of time to run on every page load. Is there something I am missing here with configurations or setup?

Here is the code on the Confluence page (we have 130k JIRA issues and 437 custom fields so the SQL here takes about 30 seconds)

{cache:showDate=true|index=true}

{sql-query:dataSource=jiraDS|columnLabel=true}

SELECT COUNT(j.id)

FROM jiraissue AS j 
LEFT JOIN customfieldvalue AS c ON c.issue = j.id
LEFT JOIN customfieldoption AS o ON o.id = c.stringvalue

;

{sql}

{cache}

Thanks,

Kevin Tracy

1 answer

1 vote
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
May 2, 2016

The query should only be run if the date (from showDate) changes. What version of Confluence? Make sure you are not on Confluence 5.9.5 or 5.9.6 - see Advisory on Confluence 5.9.5 and 5.9.6.

Kevin Tracy May 3, 2016

Thank you - we are indeed on 5.9.5. I will see if we can move to 5.9.7

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
May 3, 2016

Good to know. Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events