[quoted text, click to view] On Jun 27, 9:19 pm, Mark.J.Br...@gmail.com wrote:
> I have a report in SQL Reporting Services 2005 which calls a stored
> proc and the report takes a very long time to run and sometimes
> returns zero records. But when i run the stored proc in query analyzer
> it takes about 4 seconds.
>
> I have checked the execution log on the RS using the below sql:
>
> Select * from ExecutionLog with (nolock) order by TimeStart DESC
>
> It shows that i have a large amount of time for the dataretrieval
> (601309ms, about 10mins) and does not return any records.
>
> TimeDataRetrieval TimeProcessing TimeRendering
> Source Status ByteCount RowCount
> 601309 2227
> 3 1 rsSuccess 4916 0
>
> The weird thing is that when i run it in query analyzer, i get about
> 400 records in 4 seconds !!
>
> I dont understand what RS is doing to take up so much time like this
> to retrieve data.
>
> The report is very simple - it basically returns the records straight
> out into a table.
>
> Can anyone suggest where to look or how to troubleshoot this problem?
Of course, SSRS has some overhead in being a service as opposed to
directly being a part of the database (as w/a query). Also, it
accesses IIS, etc (which adds overhead). The first thing that I can
suggest doing is to run the Database Engine Tuning Advisor against the
query used in the report and implement any indexes that it suggests.
Also if you are using report parameters, you should verify that they
are linked correctly in the datasets (via Data view -> Edit Dataset
[...] -> Parameters tab). Also, verify that there are not other
processes running on the machine that are consuming excessive
resources (though this could be a long shot). Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant