Fast query runs slow in SSRS

前端 未结 17 922
粉色の甜心
粉色の甜心 2020-11-28 23:53

I have an SSRS report that calls out to a stored procedure. If I run the stored procedure directly from a query window, it will return in under 2 seconds. However, the sam

相关标签:
17条回答
  • 2020-11-29 00:30

    Couple of things you can do, without executing the actual report just run the sproc from within the data tab of reporting services. Does it still take time? Another option is to use SQL Profiler and determine what is coming in and out of the database system.

    Another thing you can do to test it, so to recreate a simple report without any parameters. Run the report and see if it makes a difference. It could be that your RS report is corrupted or badly formed that may cause the rendering to be really slow.

    0 讨论(0)
  • 2020-11-29 00:31

    I will add that I had the same problem with a non-stored procedure query - just a plain select statement. To fix it, I declared a variable within the dataset SQL statement and set it equal to the SSRS parameter.

    What an annoying workaround! Still, thank you all for getting me close to the answer!

    0 讨论(0)
  • 2020-11-29 00:32

    Had the same problem, and fixed it by giving the shared dataset a default parameter and updating that dataset in the reporting server.

    0 讨论(0)
  • 2020-11-29 00:33

    Add this to the end of your proc: option(recompile)

    This will make the report run almost as fast as the stored procedure

    0 讨论(0)
  • 2020-11-29 00:33

    I Faced the same issue. For me it was just to unckeck the option :

    Tablix Properties=> Page Break Option => Keep together on one page if possible

    Of SSRS Report. It was trying to put all records on the same page instead of creating many pages.

    0 讨论(0)
  • 2020-11-29 00:37

    I had the same problem, here is my description of the problem

    "I created a store procedure which would generate 2200 Rows and would get executed in almost 2 seconds however after calling the store procedure from SSRS 2008 and run the report it actually never ran and ultimately I have to kill the BIDS (Business Intelligence development Studio) from task manager".

    What I Tried: I tried running the SP from reportuser Login but SP was running normal for that user as well, I checked Profiler but nothing worked out.

    Solution:

    Actually the problem is that even though SP is generating the result but SSRS engine is taking time to read these many rows and render it back. So I added WITH RECOMPILE option in SP and ran the report .. this is when miracle happened and my problem got resolve.

    0 讨论(0)
提交回复
热议问题