I have a report that uses different data containers to display the same results... one is a crosstab and another is a chart. So I created the crosstab first, then inserted a chart and modified it to use Query1 (crosstab source). When I look at the SQL for the report, Query1 has 2 actual queries called Query1.0 and Query1.1, which have identical native and Cognos SQL. Does anyone know why both statements are created and run, when only one is needed? It's not as bad when the queries are identical because the DB typically can retrieve the cached result quickly, but if there's a slight variation between the data containers (but still from a single Query), the DB would run 2+ queries unnecessarily and performance suffers. Is there any way to have only the main query run and have all data containers get their data from that one?
Thanks.
Is this C8 or ReportNet?
This is Cognos 8.2
Here's my guess: http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos-l/sqlmdx-generated-for-a-crosstab-based-on-relational-source-2473773
Because you're using a crosstab and a chart, they need separate temp files to be created so there are two separate queries.
If you have anything different in sort order and grouping, cognos generates a separate query for each instance.