Use MAX() instead of SUM() for latency measurements in sqlserver (#3471)
This commit is contained in:
parent
a8c6a31d1e
commit
650f44980b
|
@ -539,7 +539,7 @@ SELECT DatabaseName, ReadLatency
|
||||||
FROM #baseline
|
FROM #baseline
|
||||||
WHERE datafile_type = ''LOG''
|
WHERE datafile_type = ''LOG''
|
||||||
) as V
|
) as V
|
||||||
PIVOT(SUM(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
PIVOT(MAX(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ SELECT DatabaseName, WriteLatency
|
||||||
FROM #baseline
|
FROM #baseline
|
||||||
WHERE datafile_type = ''LOG''
|
WHERE datafile_type = ''LOG''
|
||||||
) as V
|
) as V
|
||||||
PIVOT(SUM(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
PIVOT(MAX(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ SELECT DatabaseName, ReadLatency
|
||||||
FROM #baseline
|
FROM #baseline
|
||||||
WHERE datafile_type = ''ROWS''
|
WHERE datafile_type = ''ROWS''
|
||||||
) as V
|
) as V
|
||||||
PIVOT(SUM(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
PIVOT(MAX(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ SELECT DatabaseName, WriteLatency
|
||||||
FROM #baseline
|
FROM #baseline
|
||||||
WHERE datafile_type = ''ROWS''
|
WHERE datafile_type = ''ROWS''
|
||||||
) as V
|
) as V
|
||||||
PIVOT(SUM(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
PIVOT(MAX(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue