Hi All,
I recently spent a few hours debugging a poor running report for a report author. The report had a query that joined two sub queries. This joining query was the only query used by the report. The sql in the report looked good (when you use the show sql in report studio). Report Studio showed a single query with all the query being performed Native, filters joins etc all being passed through to the database..
It was only when we looked at the real sql running in oracle we could see that cognos had really split the single query into two, ignoring a number of filters, and then doing a join and filters locally. Hence the poor performance. I could force the full query onto the database by telling the report to not use local cache. However, I don't want to have to debug every report so am thinking of switching this off completely.

Take the above. I have filters in Q2 and Q3 based on a parameters. Cognos sent Q2 and all its filters to the database, yet for Q3 it sent the query ignoring the filters, even though the filters are identical to Q2. This resulted in a slow long running Q3 query. It was only when attempting to do the join in Query 1 that Cognos then decided to filter q3. I wasn't using any local processing like functions which would result in local processing.
Switching off local cache forced the full query, with all the filters into the database resulting in something running much quicker.
I think my question is - why would Cognos not send the filtered sub queries to the database when using local cache.
I'm also pondering "what's the point in Report Studio show SQL", given that it can be very different after Key Transformations. Why not just show the SQL of the Key Transformations...
------------------------------
Marc Reed
------------------------------