Some examples of statistics which can be retrieved from the ExecutionLog table:
- Most active users
- Most popular reports
- Reports with most DataRetreival in Total
- Reports with highest execution time in Total
- Reports with highest data retrieval in Total
- Slowest reports
-- Most Active users.
SELECT Username, COUNT(*) as Executed
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
GROUP BY UserName
ORDER BY COUNT(*) DESC
-- Most popular reports
SELECT Name,b.path, COUNT(*)AS Executed
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
GROUP BY Name,b.path
ORDER BY COUNT(*) DESC
-- Reports with most Dataretrieval
SELECT TOP 25 Name, b.path, AVG(BYTECOUNT/(1024)) AS AVG_KB,
SUM(BYTECOUNT/(1024)) as SUM_KB, COUNT(*)AS Executed
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
GROUP BY Name,b.path
ORDER BY SUM_KB desc
-- Reports with most execution time
SELECT TOP 25 Name, b.path,
SUM(TimedataRetrieval + Timeprocessing + TimeRendering)/1000 AS ExecutionTotalTimeinSec,
COUNT(*) AS Executed,
AVG(TimedataRetrieval + Timeprocessing + TimeRendering) AS AVGExecutionTimeinSec
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
GROUP BY Name, b.path
ORDER BY ExecutionTotalTimeinSec desc
-- Reports with most Rendering time
SELECT TOP 25 Name,b.path,
SUM(TimeRendering)/1000 AS RenderingTotalinSec,
COUNT(*) as Executed,
AVG(TimeRendering) AS AvgRenderinginMs
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
GROUP BY Name,b.path
ORDER BY RenderingTotalinSec desc
-- Reports with most Data retrieval time
SELECT TOP 25 Name,b.path,
SUM(TimeDataRetrieval)/1000 AS DataRetrievalTimeinSec,
COUNT(*), AVG(TimeDataRetrieval) AS AvgTimeDataRetrievalinMs
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
GROUP BY Name,b.path
ORDER BY AvgTimeDataRetrievalinMs desc
-- Slowest executed report.
SELECT TOP 10 Name,b.path, Parameters, FORMAT,TimeStart,
TimeEnd, ByteCount,
(TimedataRetrieval + Timeprocessing + TimeRendering)/1000 AS TotalTimeinSec
FROM ExecutionLog EL
JOIN CATALOG b ON EL.reportid = b.itemid
ORDER BY (TimedataRetrieval + Timeprocessing + TimeRendering) DESC
2 comments:
The calc in -- Slowest executed report is inconsistent. All the others are 100, it should be 100 instead of too.
I think it should be /1000 to get seconds, not 100.
Post a Comment