Fast query runs slow in SSRS

前端 未结 17 923
粉色の甜心
粉色の甜心 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:37

    I came across a similar issue of my stored procedure executing quickly from Management Studio but executing very slow from SSRS. After a long struggle I solved this issue by deleting the stored procedure physically and recreating it. I am not sure of the logic behind it, but I assume it is because of the change in table structure used in the stored procedure.

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

    I had the same scenario occuring..Very basic report, the SP (which only takes in 1 param) was taking 5 seconds to bring back 10K records, yet the report would take 6 minutes to run. According to profiler and the RS ExecutionLogStorage table, the report was spending all it's time on the query. Brian S.'s comment led me to the solution..I simply added WITH RECOMPILE before the AS statement in the SP, and now the report time pretty much matches the SP execution time.

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

    In my case, I just had to disconnect and connect the SSMS. I profiled the query and the duration of execution was showing 1 minute even though the query itself runs under 2 seconds. Restarted the connection and ran again, this time the duration showed the correct execution time.

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

    In our case, no code was required.

    Note from our Help Desk: "Clearing out your Internet Setting will fix this problem."

    Maybe that means "clear cache."

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

    I had the report html output trouble on report retrieving 32000 lines. The query ran fast but the output into web browser was very slow. In my case I had to activate “Interactive Paging” to allow user to see first page and be able to generate Excel file. The pros of this solution is that first page appears fast and user can generate export to Excel or PDF, the cons is that user can scroll only current page. If user wants to see more content he\she must use navigation buttons above the grid. In my case user accepted this behavior because the export to Excel was more important.

    To activate “Interactive Paging” you must click on the free area in the report pane and change property “InteractiveSize”\ “Height” on the report level in Properties pane. Set this property to different from 0. I set to 8.5 inches in my case. Also ensure that you unchecked “Keep together on one page if possible” property on the Tablix level (right click on the Tablix, then “Tablix Properties”, then “General”\ “Page Break Options”).

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

    DO you use "group by" in the SSRS table?

    I had a report with 3 grouped by fields and I noticed that the report runed very slowly despite having a light query, to the point where I can't even dial values in the search field.

    Than I removed the groupings and now the report goes up in seconds and everything works in an instant.

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