Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS 2005 Report Executions times Expand / Collapse
Author
Message
Posted Thursday, August 30, 2012 2:52 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 9, 2013 5:59 PM
Points: 83, Visits: 96
I am trying to understand the following scenario:

There is a Report that uses 2 stored procedures to retrieve data.

The Stored Procedures when run in SSMS , with params values supplied execute and completes in under one minute.

But the same Report when Run in SSRS Report Manager takes nearly one hour or more.

Here are sample data retrieval times 4202160 , 4078955 , 3499796 in milli seconds

And worse , when you try to access the same report embedded in a Wweb Applicaiton page accessed via a menu takes another 50% more time than Native SSRS Report execution time.

What shaould I do to troubleshoot this. ? Any hints or guidance is sincerely appreciated.
Post #1352506
Posted Thursday, August 30, 2012 3:05 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 10:53 PM
Points: 5,383, Visits: 7,456
It sounds like the execution plan is changing heavily between a local call and the SSRS call. Either that or data transfer on the network is amazingly slow between those two servers.

I'd start with a profiler trace to grab the xmlplan of the call when it comes from SSRS and then compare it to the one you get from SSMS. If they match, you have a problem external to the server. If they don't, you'll have to analyze the call differences between the two.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1352512
Posted Friday, August 31, 2012 12:47 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 9, 2013 5:59 PM
Points: 83, Visits: 96
Thanks. Appreciate the hint.
I did a profiler and got the showplan xml files.
Yes indeed. In SSMS there is a Clustered Index scan( 28%) , where as in SSRS execution , it is using a non-clustered index and there is a key lookup loop that is 46% cost.

How to force it to scan the clustered index ?

Post #1353055
Posted Friday, August 31, 2012 2:36 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 10:53 PM
Points: 5,383, Visits: 7,456
Typically you don't. You can add a table hint for experimentation using WITH INDEX(1) (similar to adding with NOLOCK) and see if that cures the actual problem. Don't trust the percentage costs in the execution plans, they lie like rugs. Knowing what it's doing can help though.

Are the parameters the same between your test call in SSMS and the one from SSRS? This may be a case of parameter sniffing and you possibly want to include an 'optimize for' selection in the query definition, or use other workarounds to it, such as transferring your parameters to local variables before usage.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1353092
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse