COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dssd on 07 Jun 2011 06:44:05 AM

Title: Native vs Cognos SQL - Union/Join
Post by: dssd on 07 Jun 2011 06:44:05 AM
I have a report that has union and joins. My understanding was the server runs each child query, gets the data for each query and then joins/unions it on the server locally. But, when i looked up native sql of the main query, the query looked like how it would if the query was unioned/joined in the database i.e. it had full first query unioned/joined to full second query.

Am i missing something here? Would local processing still be done and this main native sql is just a manifestation? What should the main query look like if processing, union/join, is done locally
Title: Re: Native vs Cognos SQL - Union/Join
Post by: blom0344 on 07 Jun 2011 11:28:33 AM
Beware.. beware..  Checking the SQL generated is the proposition Cognos displays. The actual execution may be quite different. 100% proof can only be guaranteed with traces on the database. In any case , databases are much better in handling sets of data, so if the actual processing can be done on the RDBMS so much the better. In most cases you will notice seperate SQL scripts when queries are handled through the server