Skip to content

Commit

Permalink
Use MAX() instead of SUM() for latency measurements in sqlserver (#3471)
Browse files Browse the repository at this point in the history
  • Loading branch information
erayaslan authored and danielnelson committed Nov 17, 2017
1 parent a8c6a31 commit 650f449
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/inputs/sqlserver/sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ SELECT DatabaseName, ReadLatency
FROM #baseline
WHERE datafile_type = ''LOG''
) as V
PIVOT(SUM(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
PIVOT(MAX(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
UNION ALL
Expand All @@ -550,7 +550,7 @@ SELECT DatabaseName, WriteLatency
FROM #baseline
WHERE datafile_type = ''LOG''
) as V
PIVOT(SUM(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
PIVOT(MAX(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
UNION ALL
Expand All @@ -561,7 +561,7 @@ SELECT DatabaseName, ReadLatency
FROM #baseline
WHERE datafile_type = ''ROWS''
) as V
PIVOT(SUM(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
PIVOT(MAX(ReadLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
UNION ALL
Expand All @@ -572,7 +572,7 @@ SELECT DatabaseName, WriteLatency
FROM #baseline
WHERE datafile_type = ''ROWS''
) as V
PIVOT(SUM(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
PIVOT(MAX(WriteLatency) FOR DatabaseName IN (' + @ColumnName + ')) AS PVTTable
UNION ALL
Expand Down

0 comments on commit 650f449

Please sign in to comment.