COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: thopper on 30 Jan 2009 05:51:33 AM

Title: SQL Stored Procedure query takes too long
Post by: thopper on 30 Jan 2009 05:51:33 AM
I have a SQL stored procedure that runs in a reasonable time but when it's used by a report the execution time increases enormously.

for example, the sp returns 165,000 rows in 1 min 12 secs;
a report that simply runs this sp using a SQL object query into a list container returns the same 165,000 rows in 17 mins 20 secs!

Wow! This is slow!

Anybody got any ideas why this might happen?

I'd be grateful for any help.

Thanks.
Title: Re: SQL Stored Procedure query takes too long
Post by: blom0344 on 03 Feb 2009 06:58:18 AM
1. How are you so sure the SP returns that many rows in such a short period. Did you test it by redirecting the output to a table?

2. I expect that the Cognos server will have a hard time processing 165,000 rows of output.

A better strategy would be to design an ETL proces that directs the SP output to a table and use this one for Cognos purposes. I assume nobody is interested in scanning 165,000 rows in a report, but this amount of data may well be the basis of a meaningful condensed report..