COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: cognos_guru on 07 Jul 2009 02:18:39 PM

Title: Does using shortcuts result in one query against the DB or two?
Post by: cognos_guru on 07 Jul 2009 02:18:39 PM
I have a query subject which returns X number of rows that I want to be displayed in a list.  Underneath that, I want another list to filter those X number of rows to exclude rows that have a certain attribute. 

I know that I cannot point both lists to the same query subject because my filter would result in filtering both lists... What are the alternatives here?  If possible, I'd like to only hit the Database with one query.

If I create a shortbut to the query subject in framework manager with the filter, will the report generate only one query against the database, or will it still be two?

Thanks
Title: Re: Does using shortcuts result in one query against the DB or two?
Post by: rockytopmark on 08 Jul 2009 02:45:57 PM
Shortcuts can be Alias or Reference...

Alias will act like a separate query subject, where a reference will simply "reference" the original query.

There is a Governor setting for the model on how Shortcuts are to be processed. 

If set to Automatic, a shortcut in the same namespace as the original will be an Alias, and if the Shortcut is in a different namespace, then it will act as a reference.

If option is set to explicit, then the shortcut itself will have a property where this can be set.
Title: Re: Does using shortcuts result in one query against the DB or two?
Post by: cognos_guru on 08 Jul 2009 04:09:45 PM
So, if I set my shortcut to be reference shortcut, and submit a report which has two lists:  one using the original query subject and one using the reference shortcut (which contains a filter), will Cognos send the database 1 query or 2?

Title: Re: Does using shortcuts result in one query against the DB or two?
Post by: rockytopmark on 09 Jul 2009 10:39:48 AM
2 lists, = 2 queries to be executed.
Title: Re: Does using shortcuts result in one query against the DB or two?
Post by: kart78 on 10 Jul 2009 01:55:56 AM

How to Apply Different Filters Using Single Query

http://www-931.ibm.com/bin/newsletter/tool/landingPage.cgi?lpId=1854