SSRS 2005 Report Executions times

  • 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.

  • 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[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • 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 ?

  • 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[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply