This query will list the 100 reports that took the longest time to run today.

You must be connected to the SSRS engine, not the database engine.

use [ReportServer]
select top 100 
datediff(s,EL.TimeStart,EL.TimeEnd) as 'Runtime(secs)',
C.Name, EL.Status, EL.Username, EL.TimeStart, EL.TimeEnd, 
EL.TimeDataRetrieval/1000 as TimeDataRetrieval, --Time it took to get the data from the datasource
EL.TimeProcessing/1000 as TimeProcessing, --Time it took to group, filter, aggregate and subreport
EL.TimeRendering/1000 as TimeRendering, --Time it took to render, page, expression evaluation
(EL.TimeDataRetrieval + EL.TimeProcessing + EL.TimeRendering)/1000 as TotalRunTime,
C.Path, EL.Parameters
from dbo.ExecutionLog EL
Inner Join dbo.Catalog C on EL.ReportID=C.ItemID AND C.type=2 --Type=Report
where EL.TimeStart >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) --Today
order by 'Runtime(secs)' desc

Leave a Reply

Your email address will not be published. Required fields are marked *