SQL Server 2008 Reporting Services 报告速度慢
我在 SQL Server 2008 Reporting Services 中遇到问题。问题是,报告有时渲染速度太慢(需要超过 30 分钟),尽管我在 SQL Server Management Studio 中获取查询并执行它,并且花费的时间不超过 25 秒。
该查询返回一个大表(大约 5000 行),我用它在报告中绘制饼图,我尝试优化查询,使其仅返回 4 行,但报告又变慢了。
让我困惑的是,有时报告(使用不同的输入)与查询一样快(大约 30 秒),我认为这可能是因为用户数量较少,所以我尝试与一些同事同时查看它,但是报告仍然很快,我尝试更改配置,但没有成功。
我两个多月以来一直在寻找这个问题的解决方案,所以如果有人能帮助我解决这个问题,我将非常感激。
I have a problem in SQL Server 2008 Reporting Services. The problem is that the report is sometimes too slow to render (it takes more than 30 min), although I took the query and executed it in SQL Server Management Studio and it didn't take more than 25 seconds.
The query returns a large table (about 5000 rows) and I use it to draw a pie chart in the report, I tried to optimize the query so that it returns only 4 rows but the report was slow again.
What confuses me is that sometimes the report (with different input) is as fast as the query (about 30 sec), I thought it might be because of low number of users so I tried with some colleagues to view it at the same time but the reports still are fast, I tried to change in the configuration but I had no luck.
I've been searching for a solution for this problem for more than two months, so if anyone could help me on this I will be very thankful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有权访问 ReportServer sql 数据库,请对 ExecutionLog 视图执行以下查询或类似查询:
从执行日志中选择 TimeStart、TimeEnd、TimeDataRetrieval、TimeProcessing、TimeRendering、Status、ReportID
这将为您提供报表呈现的详细细分(使用不同的参数)。
密切关注 TimeRendering、TimeProcessing 和 TimeDataRetrieval。
这些列中任何一列的较大或较高值都将说明您的瓶颈所在。
我过去遇到的一个问题是,当您向报告返回相当大的数据集(对于这种情况,5000 行足够大),然后您使用内置的 ssrs 过滤时,渲染速度非常慢,这会导致在非常高的 TimeRendering 值中。
所有渲染都应在数据库层完成,在 ssrs 报告本身中执行大量数据时,分组和过滤效果不佳。
If you have access to the ReportServer sql database execute the following query or similar against the ExecutionLog view:
select TimeStart, TimeEnd, TimeDataRetrieval, TimeProcessing, TimeRendering, Status, ReportID from executionlog
This will provide you with a good breakdown of your report rendering (with different parameters).
Pay close attention to TimeRendering, TimeProcessing and TimeDataRetrieval.
Large or high values for any of these columns will illustrate where your bottleneck is.
One problem that I have experienced in the past is when you are returning a fairly large dataset to the report (5000 rows is large enough for this scenario) and then you are using the inbuilt ssrs filtering, the rendering is very slow and this would result in a very high TimeRendering value.
All rendering should be done at the database layer, grouping and filtering does not perform well will large amounts of data when performed in the ssrs report itself.