COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: CognosAdmn on 10 Nov 2016 12:59:49 PM

Title: Report with List and Chart running twice as slow
Post by: CognosAdmn on 10 Nov 2016 12:59:49 PM
Hi All,

We've got a report studio report in our Cognos 10.2.1 environment with FP 4, that contains a list report and a chart. Both objects refer to the same query. This report currently runs about 9 minutes. There are a few bottlenecks for the slowness. However, if we remove the chart from the report then the list report runs in 4.5 minutes. It appears that both the list and chart keep running the query separately. Is this expected? I thought as long as the report objects use the same query the query would be run once on the database. Any input is greatly appreciated.

Please let me know if you need any additional information.

Thank you.
Title: Re: Report with List and Chart running twice as slow
Post by: MFGF on 11 Nov 2016 03:25:47 AM
Quote from: CognosAdmn on 10 Nov 2016 12:59:49 PM
I thought as long as the report objects use the same query the query would be run once on the database.

Hi,

This is a common misconception, but sadly it's not the case. Multiple report containers using the same query will cause the query to be executed multiple times - once for each container. The only real benefit to having them share a query is ease of maintenance. What you are seeing is normal and is expected behaviour.

Cheers!

MF.
Title: Re: Report with List and Chart running twice as slow
Post by: CognosAdmn on 11 Nov 2016 09:04:20 AM
Thank you MFGF. Your answer is very helpful.

Much appreciated.
Title: Re: Report with List and Chart running twice as slow
Post by: Michael75 on 15 Nov 2016 08:39:43 AM
MF wrote:

QuoteMultiple report containers using the same query will cause the query to be executed multiple times - once for each container. The only real benefit to having them share a query is ease of maintenance.

Thank you MF for the good news  :D  Do you know if this is this necessarily and always the case? I'm sure that in the past I've seen articles about techniques that allowed re-use of queries. But maybe this was for two containers of the same type - two lists, crosstabs or whatever . .  .
Title: Re: Report with List and Chart running twice as slow
Post by: Invisi on 16 Nov 2016 08:01:21 AM
re-use of the query is what you are doing. You mean re-use the results?