Created
January 14, 2015 07:32
-
-
Save osya/a856430c2bf47e9c3184 to your computer and use it in GitHub Desktop.
Определить наиболее часто выполняющиеся SSRS-отчеты #SQL #SSRS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(Name) AS ExecutionCount, | |
Name, | |
SUM(TimeDataRetrieval ) AS TimeDataRetrievalSum, | |
SUM(TimeProcessing ) AS TimeProcessingSum, | |
SUM(TimeRendering ) AS TimeRenderingSum, | |
SUM(ByteCount ) AS ByteCountSum, | |
SUM([RowCount] ) AS RowCountSum | |
FROM | |
( | |
SELECT TimeStart, | |
Catalog.Type , | |
Catalog.Name , | |
TimeDataRetrieval, | |
TimeProcessing, | |
TimeRendering, | |
ByteCount, | |
[RowCount] | |
FROM Catalog | |
INNER JOIN ExecutionLog ON Catalog .ItemID = ExecutionLog .ReportID | |
WHERE Type = 2) AS RE | |
GROUP BY Name | |
ORDER BY COUNT(Name) DESC, Name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment