COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: dmburke11 on 30 Jan 2014 09:05:32 AM

Title: Performance when using Conditional Blocks
Post by: dmburke11 on 30 Jan 2014 09:05:32 AM
If I have conditional blocks containing a crosstab, in some cases nested conditional blocks (for report type, report output, etc), should this affect performance?

Does Cognos run/produce all crosstabs for all possible conditions prior to rendering the report page and simply only render based on the condition(s) met?

Title: Re: Performance when using Conditional Blocks
Post by: bdbits on 03 Feb 2014 02:02:27 PM
As far as I know, queries run before the contents of conditional blocks are rendered. Thus you would be retrieving the data whether or not you were displaying it.

If you use render variables instead, the decision is made whether to include the object before running queries. So a render variable would be more efficient.

At least that is my understanding. I've never run a report trace to confirm it, though, and have just naturally gravitated to render variables. Someone correct me if I am wrong, please!  :-\
Title: Re: Performance when using Conditional Blocks
Post by: CognosPaul on 04 Feb 2014 02:04:44 AM
Cognos will first determine which objects need to be rendered before sending queries to the database. Conditional blocks will work the same as render variables. You can test this by putting some slow running object inside the block.